=== Amino Engine ===
Contributors: aminoengine
Tags: woocommerce, email marketing, abandoned cart, marketing automation, ecommerce
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.0.13
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects your WooCommerce store to Amino Engine so orders, carts, checkouts, customers and products reach your email automation reliably.

== Description ==

Amino Engine for WooCommerce is the official connector for **Amino Engine**, an email marketing
automation service for online stores.

It sends your store's events to Amino Engine so that automated emails — abandoned cart, welcome,
order confirmation, back in stock, price drop, win-back — fire on real facts about real orders.

**Connecting takes no clicks at all** if you downloaded this plugin from your own Amino Engine
account: activate it and it connects itself, because the download you asked for already carries a
one-time code for your account. There is no key to copy and nothing to paste.

**A copy installed from WordPress.org has no such code**, so after you activate it a notice appears
at the top of your dashboard with a single **Connect to Amino Engine** button. Press it and the
plugin is connected. Nothing at all leaves your site until you press that button. (You can still
paste a key by hand on the settings page if you prefer.)

**What makes this connector different**

* **Nothing is sent and forgotten.** Every event goes into a queue in your own database, is
  delivered with a real HTTP request whose status code is actually read, and is retried on a
  1 minute / 5 minute / 30 minute / 2 hour / 12 hour schedule. Anything that still fails lands in a
  dead-letter list you can see and re-drive from the settings page. There is no configuration in
  which an event disappears without you being able to see that it did.
* **Purchases are never inferred from a page load.** Order events come from the order record
  changing state, not from the shopper reaching the thank-you page. If a shopper closes the tab,
  pays through a redirecting gateway, or the receipt page is cached, the purchase is still recorded.
* **The opt-in checkbox is an artifact, not a guess.** The exact sentence the shopper saw is stored
  with their consent. A box that was never on screen — an Apple Pay or Google Pay express checkout,
  for example — records nothing at all, rather than being treated as a refusal.
* **Works on both checkouts.** The classic (shortcode) checkout and the Blocks checkout are both
  supported, using the Additional Checkout Fields API on Blocks. The Diagnostics tab tells you which
  one your store is actually running.
* **Abandoned-cart links that rebuild the cart.** The recovery link is a short, expiring, opaque
  token pointing at a snapshot held on your own server. It contains no personal data, it cannot be
  edited to add a product, and it merges into an existing cart rather than wiping it.
* **High-Performance Order Storage (HPOS) compatible**, declared and implemented — the plugin uses
  the WooCommerce CRUD API exclusively and never touches order post meta.
* **A password-free door for wholesale customers.** Put `[aminoengine_code_gate purpose="wholesale_portal"
  redirect="/wholesale/"]` on a page and your wholesale buyers get in by typing their email address and
  the six-digit code Amino Engine emails them. There is no password for them to forget, nothing for you
  to reset, and **the code is never stored on your site** — your site only ever asks Amino Engine whether
  the code somebody typed was the right one.
* **Safe on staging.** The plugin binds your key to the site URL it was activated on. A staging
  clone carrying a copy of your live database will queue and log events but send nothing, and it
  says so in a banner. This stops a staging refresh from firing duplicate emails at real customers.

== External services ==

This plugin is an interface to **Amino Engine**, an email marketing automation service operated by
Amino Engine (https://aminoengine.com). The plugin is not useful without an Amino Engine account.

**If you installed this plugin from WordPress.org, nothing at all is transmitted until you press
Connect, or paste an API key and it validates. Installing or activating the plugin sends nothing.**

**If you downloaded this plugin from your own Amino Engine account, it connects itself.** That copy
contains a file called `connect.json` holding a one-time connection code that was created for your
account while you were signed in to Amino Engine and pressed the button to download it — the screen
you pressed it on says, in one sentence, that the plugin will connect itself. So on the first
WordPress admin page you open after activating it, the plugin sends that code and connects. You are
then shown "Connected to Amino Engine" and there is nothing to press. It does this **once**, never
over a plain-http site, and never when the plugin already holds a working key. If it is refused for
any reason you are shown why, and a Connect button to try again.

If that copy finds a key already stored on this site, it first asks Amino Engine whether that key
still exists (a `GET https://app.aminoengine.com/api/v1/ping` presenting the stored key, the same
request the "Validate and save" button makes). If the key still works, nothing further happens and
the connection code is not used. If Amino Engine answers that it does not recognise the key, the
plugin forgets it and connects with the code from your download. If Amino Engine cannot be reached,
the key is left exactly as it is. **This check only ever happens on a copy downloaded from your own
Amino Engine account. A copy installed from WordPress.org never makes it.**

**The one request it makes** goes to `https://app.aminoengine.com`
(`/api/connect/wordpress/plugin/hello`) and carries only: the one-time connection code that came
with your download, your site address, the plugin, WordPress and WooCommerce version numbers, and
your site's public appearance — your site title, your logo URL, the colour palette and font names
your theme declares, and the addresses of any Google Fonts stylesheets your storefront loads. That
last part is so your emails come out in your own colours and type without you setting them up by
hand; every one of those values is already visible in the source of every page of your shop. Amino
Engine answers with the API key for your account and the plugin stores it.

If you installed this plugin from WordPress.org rather than downloading it from your Amino Engine
account, the Connect button instead opens `https://app.aminoengine.com` in your browser so you can
approve the connection while signed in; Amino Engine then delivers the key back to this site's own
REST endpoint (`/wp-json/amino-engine/v1/connect`), which accepts it only for the request you just
started. No data about your store or your customers is sent in either case.

**If you connected your store from inside Amino Engine using WordPress's own "Authorize
Application" screen**, Amino Engine already holds an administrator application password for this
site. It may then install and switch this plugin on for you, and hand it the key straight away
through this site's own REST endpoint (`/wp-json/amino-engine/v1/adopt`). That request has to be
signed in as an administrator of this site to be accepted, and it is refused outright if this store
is already connected and working. You can stop it at any time by revoking the "Amino Engine"
application password at Users -> Profile.

**Connecting also creates a WordPress application password** named "Amino Engine" for the
administrator who pressed it, and sends it in that same request so Amino Engine can read your
orders, customers and products. It is created with WordPress's own Application Passwords feature —
the same thing the approval screen at Users → Profile creates — and you can see and revoke it there
at any time. Revoking it stops Amino Engine reading your store and nothing else. If your site does
not have application passwords available, this step is skipped and the plugin connects without one.

Once connected, the plugin sends the following to `https://app.aminoengine.com`:

* **Store events** — order id, order number, order status, order date, line items (product id,
  variant id, SKU, name, quantity, price), order totals, coupon codes, payment and shipping method,
  billing and shipping address, customer note; cart contents and totals; checkout state; product
  catalog records including price and stock. Sent when the corresponding thing happens in your store.
* **Customer identity** — the billing email address on an order, or the account email of a logged-in
  customer, plus an anonymous random browser identifier. Sent alongside the events above.
* **Consent records** — the email address, the exact wording of the opt-in checkbox that was shown,
  whether it was ticked, the shopper's IP address and browser user agent, and the time. Sent when a
  shopper submits a form that contained the checkbox.
* **Diagnostic information** — your site URL, plugin version and WooCommerce version, as request
  headers, so support can identify the installation.

The plugin also loads a small JavaScript file (`ae.js`) from the tracking hostname shown on the
settings page, on your storefront pages. It records page views, product views and cart activity
against the anonymous browser identifier described above. It is a first-party, service-related
script and is not loaded until you connect a key.

**Why that one script tag is printed directly rather than enqueued.** Everything else this plugin
puts on a page — all of its CSS, and the small checkout listener — goes through `wp_enqueue_style()`,
`wp_enqueue_script()` and `wp_add_inline_script()`. The tracking tag is the single exception, and
there are three reasons it has to be:

1. It carries its own `data-key` and `data-host` attributes, which is how it knows which store it is
   for. `wp_enqueue_script()` produces a plain `src` tag; attributes need a `script_loader_tag`
   filter, and a filter can be unhooked, reordered or stripped by another plugin without anything
   saying so.
2. It must load `async` and as early in `<head>` as possible, because everything it measures happens
   after it. Enqueueing resolves dependency ORDER, not absolute position.
3. It has to print on themes that never call `wp_head()`. Some do, and on those the enqueue system
   never runs at all — which is exactly how one shop's homepage went untracked for weeks. The plugin
   watches the page being built and inserts the tag before `</head>` itself when that happens.

The tag is a fixed string with no user input in it, and nothing per-visitor is ever written into it,
so a cached copy of a page is safe to serve to anybody.

* Service: https://aminoengine.com
* Terms of service: https://app.aminoengine.com/legal/terms
* Acceptable use policy: https://app.aminoengine.com/legal/acceptable-use
* Sub-processors: https://app.aminoengine.com/legal/sub-processors
* Privacy policy: https://aminoengine.com/privacy

Deleting the plugin removes all of its own data from your WordPress database. It does **not**
delete anything on the Amino Engine side — that is a separate, deliberate action in the Amino
Engine console.

== Wholesale and portal gates ==

Some of your customers need to get into something that is not for everybody — a wholesale price list, a
reseller portal, a document library, a page of bulk order forms.

This plugin can put a door in front of any page, with no password and no extra account:

1. The customer types the email address you have for them.
2. Amino Engine emails them a six-digit code that expires in ten minutes.
3. They type the code and they are in, for twelve hours, on that browser.

**Setting it up takes one line.** Put this shortcode on the page you want people to arrive at first:

    [aminoengine_code_gate purpose="wholesale_portal" redirect="/wholesale/"]

(If a page of yours still has the old `[ae_code_gate]` on it from version 1.0.8 or 1.0.9, edit that
page and change the tag to `[aminoengine_code_gate]`. Keep the same settings inside the brackets.)

`purpose` is your own name for this door — use a different one for each door, and a code for one will
never open another. `redirect` is where somebody lands once they are through; it must be a page on your
own site.

Then protect the page itself. In your theme's template, or in a block that runs PHP:

    if ( ! aminoengine_gate_passed( 'wholesale_portal' ) ) {
        wp_safe_redirect( home_url( '/wholesale-login/' ) );
        exit;
    }

`aminoengine_gate_email( 'wholesale_portal' )` hands you the address they proved, so you can show their own
prices.

**Building your own screens instead.** Two PHP functions and two REST endpoints do the same job:

    $sent = aminoengine_send_code( 'buyer@example.com', 'wholesale_portal' );
    $ok   = aminoengine_verify_code( 'buyer@example.com', 'wholesale_portal', '481920' );

    POST /wp-json/amino-engine/v1/code/send     {"to":"…","purpose":"…"}
    POST /wp-json/amino-engine/v1/code/verify   {"to":"…","purpose":"…","code":"481920"}

Both answer `{"ok":true}` or `{"ok":false,"reason":"…","error":"a sentence you can show somebody"}`.

**What this is, and what it is not.** Passing the gate proves that whoever is holding that browser can
read email sent to that address. That is the right strength for a price list. It is **not** a WordPress
login and it grants no permissions, so do not use it in place of a customer account for anything a
WordPress role already protects — order history, downloads, or anything that can be changed.

**The safety rules, so you do not have to think about them.**

* Codes are six digits and expire in ten minutes.
* Asking for a new code cancels the old one.
* Five wrong codes locks that address for fifteen minutes.
* Your site never stores the code — not in the database, not in a log, not anywhere.
* The "you are signed in" cookie is signed, cannot be read by JavaScript, cannot be edited to say
  somebody else's address, and cannot be used on a different door.
* A staging copy of your site will not send codes, for the same reason it does not send anything else.

== Installation ==

**If you downloaded the plugin from your own Amino Engine account:**

1. Upload the plugin from the Plugins screen and activate it.
2. That's it. It connects itself, and the notice at the top of your dashboard says **Connected to
   Amino Engine**. The **WooCommerce → Amino Engine** screen shows the account you are connected to.

**If you installed it from WordPress.org:**

1. Install it from the Plugins screen and activate it.
2. A notice appears at the top of your dashboard. Click **Connect to Amino Engine**.
3. That's it. The **WooCommerce → Amino Engine** screen will show the name of the account you are
   connected to.
4. Optional but recommended: add the CNAME record shown on the Connection tab at your DNS provider.
   This makes the tracker first-party, which materially improves how long visitors stay recognised.
5. Check the **Diagnostics** tab, and click **Send a test event** to confirm the round trip.

If you would rather connect by hand, the settings page still accepts a secret API key pasted from
the Amino Engine console.

== Frequently Asked Questions ==

= Do I have to paste an API key? =

No. Press **Connect to Amino Engine** on the notice after you activate the plugin and it connects
itself. Pasting a key by hand still works if you prefer it.

= Do I need an Amino Engine account? =

Yes. This plugin is the store-side connector for the Amino Engine service. It does nothing on its
own.

= Does it work with the Blocks checkout? =

Yes, and with the classic shortcode checkout, and with a store running both. The Diagnostics tab
tells you which one it detected. Cart and order events are identical on both, because the Blocks
Store API raises the same WooCommerce actions internally.

= Will it slow down my checkout? =

No. Events are written to a queue during the request, and the network call happens after the page
has already been delivered to the shopper, using `fastcgi_finish_request()` where the host provides
it. If your host does not, the send is capped at two seconds per request and the rest is handed to
Action Scheduler.

= Is the opt-in box pre-ticked? =

No, and there is no setting to make it so.

= What happens if Amino Engine is down? =

Events queue up and retry. Nothing is lost, and the Queue tab shows you exactly what is waiting.

= I deactivated the plugin. Did I lose my events? =

No. Deactivating stops sending and keeps everything. Only deleting the plugin removes its data.

= Does it support High-Performance Order Storage? =

Yes, declared and implemented.

= Can wholesale customers get in without a password? =

Yes. Put `[aminoengine_code_gate purpose="wholesale_portal" redirect="/wholesale/"]` on a page. They type their
email address, Amino Engine emails them a six-digit code, they type it, and they are in for twelve hours.
There is no password to reset and your site never stores the code.

= Is the code gate a login? =

No. It proves somebody can read email at that address, which is the right strength for a price list or a
portal. It is not a WordPress user and it grants no permissions, so keep using real customer accounts for
order history and anything that can be changed.

= Does the code gate work with my page cache? =

Yes. The gate page tells every common cache plugin not to cache it (it carries a security token that must
be fresh), and if a cached copy does reach somebody anyway the form simply says "that form expired,
please try again" and works on the second press. Nothing about a visitor is ever written into the page.

= What if somebody keeps asking for codes? =

Your site allows five attempts per ten minutes from one device, and Amino Engine allows three emails per
address per ten minutes on top of that. Five wrong codes locks that address for fifteen minutes.

= Can my shop's own WordPress emails go out through Amino Engine? =

Yes, and it is off until you switch it on. **WooCommerce → Amino Engine — Email** has one switch and a
tick-list of every email your shop can send. If anything at all goes wrong — we are unreachable, your
sending domain stops being verified, the message has an attachment — WordPress sends that message itself,
in the same request. A receipt is never lost.

= Which forms does the plugin watch? =

Gravity Forms, Fluent Forms, WPForms, Contact Form 7 and the WooCommerce registration form. Pick which
one is your wholesale application on the **Forms** tab and Amino Engine will be told whenever somebody
applies, so you can answer them automatically. Filling in a form is never treated as subscribing to
marketing unless the form carried a ticked box saying so.

== Screenshots ==

1. The Connection tab, showing a connected account and the tracking domain.
2. The Events tab, with a toggle and a last-sent time for each event.
3. The Consent tab, with editable wording and a live preview.
4. The Diagnostics tab, showing the detected checkout type and the last twenty deliveries.
5. The Queue tab, showing waiting, retrying and dead-lettered events.

== Changelog ==

= 1.0.13 =
* The shortcode for the wholesale sign-in door is now only `[aminoengine_code_gate]`. The short 1.0.8 spelling `[ae_code_gate]` has been withdrawn, because WordPress.org asks every plugin to keep its names to itself. **If a page of yours still has the old tag on it, edit that page and change the tag** — keep everything inside the brackets the same. A page left with the old tag prints it as plain text instead of showing the sign-in form.
* The sign-in door now checks a form's security token before it acts on anything, including "use a different email". Until now that one button was acted on first and checked afterwards, which meant another website could have posted at your shop and thrown away a wholesale buyer's half-finished sign-in.
* The way the plugin adds its tracking tag to themes that never call `wp_head()` was rebuilt so it never leaves a page half-held. On WordPress 6.9 and newer it uses WordPress's own mechanism for this; on older versions it wraps the theme template and closes up in the same breath.
* Fixed: **the buttons on the plugin's own settings screens work again.** Since 1.0.9, pressing Save on any of the plugin's tabs — or Disconnect, Check connection, Send a test event, the queue buttons, Save on the Email screen, Send test email, or the **Connect to Amino Engine** button — did nothing at all, silently. Shops that connected themselves when you installed the plugin were never affected, because that happens without the button.
* Removed the old, short names the plugin still answered to from before 1.0.9 — the checkout email and newsletter sign-up handlers. Everything the plugin registers now carries its full name. Nothing you set up changes.

= 1.0.12 =
* New shops start with NO marketing opt-in checkbox. A shopper who types their address into your checkout has asked to hear from you; a second, unticked box beside it only loses people. A shop that is already running keeps exactly the setting it has — the upgrade writes it down explicitly rather than letting the new default move it.
* The checkout email listener now flushes a pending address when the page is closed or the tab is hidden, instead of losing it with the one-second debounce timer. The fastest abandoners are the ones abandoned-checkout exists for.

= 1.0.11 =
* Fixed: **"you left something behind" emails can reach guests again.** When a shopper typed their
  email address at your checkout and then left without ordering, your shop was not telling us — so
  there was nobody to send an abandoned cart or abandoned checkout email to. It has been that way
  since 1.0.9. Shoppers who complete an order were never affected. Nothing on your side changes and
  nothing needs setting up again.

= 1.0.10 =
* Fixed: **the marketing tick box at your classic checkout now records every shopper, not just the
  first one.** The plugin was filing every checkout consent under the same reference, because
  WooCommerce has not given the order its number yet at the moment we read the box. Your shop's own
  queue treated the second shopper, and every shopper after them, as a repeat of the first and
  quietly dropped them. The consent is now filed under the real order number. Nothing that was
  already recorded changes; from this version on, everyone who ticks the box is recorded.

= 1.0.9 =
* Changed: everything this plugin stores on your site now carries a longer, unmistakable name —
  `aminoengine_` instead of `ae_`. WordPress.org asks every plugin to do this so that two plugins
  can never quietly overwrite each other's settings. **Your shop upgrades itself.** The first time
  1.0.9 loads it moves every setting, both of its database tables and its scheduled job across, and
  checks each one arrived before removing the old copy. Your store stays connected, your queue keeps
  every event in it, and anyone signed in to a wholesale portal stays signed in.
* Changed: the shortcode is now `[aminoengine_code_gate]`.
* Changed: if your theme or another plugin calls `ae_gate_passed()`, `ae_gate_email()`,
  `ae_send_code()` or `ae_verify_code()`, those are now `aminoengine_gate_passed()`,
  `aminoengine_gate_email()`, `aminoengine_send_code()` and `aminoengine_verify_code()`. The four
  filters `ae_cart_token_ttl`, `ae_label_is_marketing_consent`,
  `ae_checkout_started_requires_email` and `ae_claimed_email_events` gained the same prefix.
* Changed: our styles now go through WordPress's own stylesheet system instead of being written
  straight into the page, so your caching and security plugins can see them.
* Changed: our admin messages now appear only on the dashboard, the Plugins screen and your shop's
  own screens — and each one can be dismissed for good.
* Fixed: the page address recorded with an event is now cleaned before it is stored.

= 1.0.8 =
* Added: a password-free door for wholesale customers. Put one shortcode on a page and your buyers
  get in by typing their email address and the six-digit code we email them. No password to reset,
  and your site never stores the code.
* Added: your shop can now send its own WordPress and WooCommerce email through Amino Engine, from
  your own verified address, with every message in your Messages log. Off until you switch it on,
  and if anything goes wrong WordPress sends that message itself — a receipt is never lost.
* Added: the plugin now tells Amino Engine when somebody fills in a form — including which form is
  your wholesale application — so an application can start an email automatically. Gravity Forms,
  Fluent Forms, WPForms, Contact Form 7 and the WooCommerce registration form.
* Added: the tracking script now goes on every page of your shop, including pages whose theme never
  calls wp_head(). Some themes' homepages were not being tracked at all.
* Added: product and category pages now tell the tracker what they are about, read from WooCommerce
  itself rather than guessed from your SEO plugin's page data. On shops selling variable products
  that guess was usually finding nothing.
* Fixed: a brand-new copy of the plugin could be refused as "more than a day old" if an older copy
  had been on the site before. It now measures the copy that is actually there.
* Fixed: a plugin folder replaced over SSH, or a zip installed over an existing copy, now connects
  itself instead of waiting for an activation that WordPress never announces.
* Fixed: a form event recorded the address of the form's own submission handler rather than the page
  the person was on, and a plain WooCommerce registration arrived carrying seventeen of WooCommerce's
  own hidden tracking fields.

= 1.0.7 =
* Fixed: on four of the five ways of connecting a store, the tracking script was never put
  on the shop — so nobody who visited was recognised and no automatic email had anybody to
  go to. Tracking now works the moment a store is connected, from Amino Engine's own
  address. Your own tracking domain is still worth setting up, but it is an upgrade, not
  something your shop waits for.
* Fixed: the plugin ignored everything Amino Engine told it when it checked in, so a shop
  that was set up wrongly could never repair itself. It now applies the answer, checks in
  on its own every few hours, and there is a **Check connection** button on the Connection
  tab that repairs a store on the spot.
* Fixed: the plugin could throw away its own working key and disconnect your store with
  nothing on screen to explain it. A key our server refuses is now kept and flagged, with
  the reason and a Reconnect button.
* Fixed: one shopper was being counted as a new stranger on every page. Your shop and the
  tracking script now agree on one visitor id, and the record of somebody who clicked a
  link in one of your emails is no longer wiped out by the next page they open.
* Fixed: an abandoned checkout on WooCommerce's new block-based checkout produced nothing
  at all, and the classic checkout only noticed an email address if the shopper also
  changed an address field. Both now report the address a second after it is typed.
* Fixed: "here is your cart back" links now genuinely put the cart back, skip anything
  that has since sold out, and are only used up once something really is in the basket.
* Fixed: product updates were retried until they died even though every attempt had
  worked.
* Fixed: the Diagnostics tab said a store connected by pasting a key had never completed a
  connection.

= 1.0.6 =
* Fixed: the plugin's "am I connected" check was being refused by Amino Engine even when
  the key was perfectly good, so stores were told their key was not recognised. This was the
  last of the three reasons a connected store still showed as waiting.
* Added: if you connect your store from your Amino Engine account, Amino Engine can now install
  and switch on this plugin for you and connect it in the same step. Nothing to download, nothing
  to upload, nothing to paste.
* A store that is already connected and working is never taken over by that step.

= 1.0.5 =
* Fixed: the plugin was sending to an address that did not exist, so Amino Engine never saw a
  store as connected. Every store on this version now talks to the right place, and uses the
  address Amino Engine gives it when you connect.
* Fixed: stores connected automatically were holding events back as a dry run and never sending
  them. Orders, carts and sign-ups from those stores now go out as they always should have.
* Added: the Diagnostics tab now shows which address this store is talking to.

= 1.0.4 =
* Fixed: version 1.0.3 could show "There has been a critical error on this website" on every
  WordPress admin page. Nothing was wrong with your store or your data — one line inside the
  plugin was written in a way WordPress could not call. Every admin page works again.
* Added: an automatic check that stops that kind of mistake being released again. Every place
  this plugin asks WordPress to call it is now run through WordPress's own hook code as part
  of the plugin's test suite.

= 1.0.3 =
* Fixed: a store that still held an old, dead key could not connect. If the key this store is
  holding is one Amino Engine no longer recognises, the plugin now forgets it and connects itself
  with the code inside the download, instead of sitting on a key that does not work. A key that
  still works is never touched, and if Amino Engine cannot be reached the key is left exactly as
  it is.
* Fixed: pressing Disconnect on a plugin downloaded from your Amino Engine account now lets it
  connect itself again on the next admin page, instead of needing the plugin turned off and on.
  The message after Disconnect says so, and tells you how to stop it if that is not what you want.
* Fixed: the Connection tab no longer says "Connected" above a key that has been refused. It says
  the key no longer works and what to do about it.
* Fixed: a crash on the admin page immediately after a successful automatic connection.

= 1.0.2 =
* A plugin downloaded from your own Amino Engine account now **connects itself** on the first admin
  page you open after activating it. No button, no key, nothing to paste. A copy installed from
  WordPress.org is unchanged — it still contacts nothing until you press Connect.
* The connection now also tells Amino Engine what your shop looks like — your site title, logo,
  theme palette, font names and any Google Fonts your storefront loads — so your emails come out
  in your own colours and type without setting them up by hand.
* Clearer notices: "Connected to Amino Engine" when it worked, and the reason plus a Try again
  button when it did not.

= 1.0.1 =
* Fixed: the queue's time budget is now a hard cap. It is checked before every
  request instead of once per run, so a slow or unreachable server can no longer
  hold up a checkout on hosts where the flush runs in front of the shopper.
  Anything not sent stays queued and goes out on the next scheduled pass.
* Fixed: the text domain now matches the plugin slug, so translations can load.

= 1.0.0 =
* First release.
* One-click connect: no API key to copy or paste.

== Upgrade Notice ==

= 1.0.13 =
The buttons on the plugin's own settings screens work again, and the wholesale sign-in door gets a security fix. If a page of yours still uses the old `[ae_code_gate]` shortcode, edit it and change the tag to `[aminoengine_code_gate]`, or that page shows the tag as plain text.

= 1.0.12 =
New shops start with no marketing opt-in checkbox; shops already running keep the setting they have. Checkout email capture no longer loses shoppers who leave inside a second.

= 1.0.11 =
Fixes abandoned cart and abandoned checkout for guests: since 1.0.9 a shopper who typed their
email at checkout and left was never recorded, so no reminder could be sent. Upgrade if you
send cart reminders.

= 1.0.10 =
Fixes marketing opt-ins at the classic checkout: only the first shopper's tick was being
recorded, every one after it was dropped. Upgrade if you collect consent at checkout.

= 1.0.9 =
Renames everything the plugin stores, as WordPress.org requires. Your shop moves itself
across on the first page load: still connected, nothing queued lost, wholesale buyers still
signed in. The shortcode and four PHP functions were renamed — see the changelog.

= 1.0.8 =
Adds a password-free code gate for wholesale buyers, sends your shop's WordPress email
through your own verified address, reports form submissions, and tracks pages whose theme
never calls wp_head(). Fixes a fresh copy being refused as out of date.

= 1.0.7 =
Fixes tracking that was never printed on some shops, an anonymous id the plugin and the
tracker each kept overwriting, cart recovery that ran too early to see a cart, and an
order event that could fire twice. Worth taking.

= 1.0.6 =
Required for every store. The plugin's connection check was being refused even with a good key,
so shops showed as waiting forever. Also lets Amino Engine set this plugin up for you when you
connect your store from your Amino Engine account.

= 1.0.5 =
Required for every store. Earlier versions sent to an address that does not exist, and stores
that connected automatically never sent anything at all. Update and your shop's activity
reaches Amino Engine.

= 1.0.4 =
Required for anyone on 1.0.3: 1.0.3 broke every WordPress admin page. Update to
1.0.4 and the admin works again.

= 1.0.3 =
Recommended: a store holding an old, dead key can now connect again on its own,
and the Connection tab tells the truth when a key has stopped working.

= 1.0.2 =
Recommended: a plugin downloaded from your Amino Engine account now connects
itself, so nobody has to press Connect after activating it.

= 1.0.1 =
Recommended for every store: the queue can no longer overrun its time budget
during checkout.

= 1.0.0 =
First release.
