=== ZeroACE AI Sales Agent ===
Contributors: zerocorestudio
Tags: woocommerce, ai chat, chatbot, sales assistant, customer support
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 3.5
WC tested up to: 11.0
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add ZeroACE's AI sales & service chat assistant to your WooCommerce storefront. Powered by your ZeroACE account.

== Description ==

ZeroACE AI Sales Agent puts an AI sales and customer-service assistant on your WooCommerce storefront. Shoppers
can ask about products, get recommendations, and check out — the assistant reads your catalog and builds
the cart, then hands off to your normal WooCommerce checkout (you keep your payment gateway, tax, and
fulfillment exactly as they are).

This plugin is a lightweight loader: the chat experience runs in **ZeroACE**, and this plugin injects the
shared chat widget into your storefront once you connect your store. It renders nothing until connected.

**External service disclosure.** This plugin connects to ZeroACE, a third-party service, to power the AI
chat. When enabled, the widget loads ZeroACE's script on your storefront and communicates with ZeroACE's
gateway to answer shoppers. You need a ZeroACE account. Please review:

* ZeroACE website: https://zeroace.ai
* Terms of Service: https://zeroace.ai/terms
* Privacy Policy: https://zeroace.ai/privacy
* Pricing: https://zeroace.ai/pricing

**ZeroACE is a paid service.** This plugin is free, but the assistant it loads requires a paid ZeroACE
subscription, and ZeroACE additionally charges a commission on the goods value of orders the assistant
closes itself (never on your other sales). Your shoppers still pay you directly through your own
WooCommerce checkout and payment gateway — ZeroACE is not a payment processor and does not hold your
money. Current plans and the commission rate are listed on the pricing page linked above.

**What data is sent to ZeroACE.** When a shopper opens the chat, their messages and the page context are
sent to ZeroACE's gateway so the assistant can answer, and ZeroACE reads your catalog through the
WooCommerce REST credentials you connect. If the shopper chooses to order, the details they give the
assistant (such as a delivery address) are used to build the cart that is handed back to your checkout.
Conversations are not used to train AI models. ZeroACE processes this data on your behalf as described in
its Privacy Policy, linked above.

**Your delivery settings.** To describe your delivery options correctly, ZeroACE reads your shipping zones
and methods (through the WooCommerce REST credentials you connect) and your Local Pickup setting (through
this plugin). When you change a delivery setting, the plugin sends an empty notification to ZeroACE so it
re-reads them — that notification carries no settings and no customer data. This is store configuration,
not customer data.

**Orders placed through the assistant.** When one of those orders changes status — for example when the
shopper pays — the plugin sends ZeroACE the order number and the time, and nothing else, so the assistant
can answer "where is my order?" with the current status instead of a stale one. ZeroACE then reads the
order through the WooCommerce REST credentials you connect. Orders placed any other way (your normal
checkout, the admin, a point of sale) are not reported: the plugin marks the orders the assistant created
and only those are sent.

The plugin itself stores only your connection settings (a pairing token, the widget key ZeroACE pushes,
and the two addresses to send those notifications to). It does not collect or store shopper data locally,
and it renders nothing until you connect.

**Telling your own shoppers.** The disclosure above is for you. Your shoppers are told by *your* privacy
policy, so the plugin adds suggested text for it under Tools > Privacy — including the part that is easy to
miss: while the assistant is enabled its script loads on every storefront page, so a visitor's browser
contacts ZeroACE even if they never open the chat. Copy the suggested text into your policy and edit it to
match how you describe things.

== Installation ==

1. Install and activate the plugin.
2. Go to **Settings → ZeroACE AI Sales Agent**.
3. Copy your **Site URL** and **Pairing token** into ZeroACE's "Connect WooCommerce" screen.
4. In ZeroACE, also connect your WooCommerce data with a REST API key (WooCommerce → Settings → Advanced →
   REST API) so the assistant can read your catalog and create carts.
5. Once connected, ZeroACE pushes your widget key and the chat assistant goes live on your storefront.

== Frequently Asked Questions ==

= Do I need a ZeroACE account? =
Yes. This plugin connects your store to ZeroACE, which provides the AI assistant.

= Does it change my checkout? =
No. The assistant builds a cart and sends the shopper to your normal WooCommerce checkout. Your payment
gateway, tax, and fulfillment are unchanged.

= What data does the plugin store? =
Only connection settings (a pairing token, the widget key, and the two notification addresses). No shopper
data is stored locally.

= Does the plugin send my orders to ZeroACE? =
Only the ones the assistant placed, and only their order number and the time they changed status. Orders
from your normal checkout, the admin, or a point of sale are never reported.

= Why does the assistant need my Local Pickup setting? =
So it does not offer collection you do not do — or, worse, fail to offer collection you do. WooCommerce has
two local-pickup implementations: the older shipping-zone method, and the newer Local Pickup under
WooCommerce > Settings > Shipping. Only the first is visible over the WooCommerce REST API, so the plugin
reads the second for ZeroACE. Nothing is changed; it is read only.

= How do I remove the chat widget? =
Disconnect the store in ZeroACE (which clears the widget key), or deactivate the plugin.

== Screenshots ==

1. The settings screen: your Site URL and pairing token, ready to paste into ZeroACE's "Connect WooCommerce" form.
2. The connected state — once ZeroACE pushes your widget key, the plugin reports that the assistant is live.
3. The assistant answering a shopper on the storefront — from the store's live catalogue, including what is out of stock.
4. The assistant builds the basket and hands the shopper to checkout.
5. The store's own WooCommerce checkout takes over — your payment methods and settings, unchanged.

== Changelog ==

= 1.2.0 =
* The assistant now answers "where is my order?" with the current status. When an order the assistant placed
  changes status — paid, fulfilled, cancelled — the plugin tells ZeroACE so it re-reads the order instead of
  waiting for its next scheduled check, which could be up to half an hour later.
* Only orders the assistant placed are reported, and only their order number and the time. Orders from your
  normal checkout, the admin, or a point of sale are never sent.
* Added suggested privacy-policy text under Tools > Privacy, so you can tell your own shoppers what the
  assistant sends to ZeroACE without writing it yourself.

= 1.1.2 =
* Fixed: refreshing the settings screen after regenerating the pairing token regenerated it a second time,
  leaving the token you had just copied invalid. The page now reloads cleanly after any change.
* The regenerate notice is clearer about what breaks until you paste the new token into ZeroACE.

= 1.1.1 =
* Fixed: the assistant could not connect on some stores. The gateway address was being discarded while it
  was saved, so the widget loaded but never reached ZeroACE.

= 1.1.0 =
* The assistant now describes your delivery options correctly, including Local Pickup configured under
  WooCommerce > Settings > Shipping (which is not a shipping-zone method and is not visible over the
  WooCommerce REST API).
* Changing a delivery setting notifies ZeroACE so the assistant reflects it immediately.

= 1.0.0 =
* Initial release: storefront widget injection + pairing-authenticated connect endpoint.
