=== Extraordinary AI Shopping Assistant for WooCommerce ===
Contributors: extraordinarythemes
Tags: woocommerce, ai, chatbot, product recommendations, live chat
Requires at least: 6.2
Requires PHP: 7.4
Tested up to: 7.1
Stable tag: 1.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI chatbot for WooCommerce: shoppers find products, add to cart, pick shipping and pay by chatting. Grounded in your own documents.

== Description ==

Extraordinary AI Shopping Assistant is an **AI chatbot and sales assistant for
WooCommerce**. Shoppers ask for what they want in their own words, and it searches
your catalogue, answers questions about your products, adds items to the cart,
presents your real shipping rates and payment methods, and hands over to your
normal WooCommerce checkout.

It replaces several things at once: a product finder and conversational search
for your catalogue, a customer support chatbot that answers from your own
policies, a product recommendation engine, and a live chat inbox with human
handoff for the conversations that need a person.

Answers are grounded in **your** content. Upload your shipping policy, returns
policy, size guides or spec sheets, and the assistant answers from those instead
of guessing.

= An account is required =

**This plugin is a client for the Extraordinary AI Shopping Assistant service and does not
work on its own.** All AI processing happens on the service's servers, not on
your site, so a free or paid account is required — there is nothing the plugin
could do locally without one.

The free plan includes 800,000 tokens per month, one store, and three
knowledge-base documents. **It does not ask for a payment card.** You register
on the vendor's storefront, receive a licence key, and paste it into the plugin.

This design is deliberate: it means you never handle an AI provider API key,
never pay an AI provider directly, and never expose a key on your own server.

= What it does =

* **Conversational product discovery** — search and compare your catalogue in natural language
* **Recommendations** — personalised from the shopper's own past orders when they are signed in
* **Cart control** — add, remove and change quantities, including product variations
* **Shipping and payment** — your real WooCommerce rates and gateways, never invented ones
* **Order help** — a signed-in shopper can ask about their own orders
* **Knowledge base (RAG)** — upload PDF, Word (.docx), Excel (.xlsx), CSV, TXT or Markdown
* **Custom instructions** — set the assistant's persona and house rules
* **Answers in your language** — follows your site language, or force a specific one
* **Conversations inbox** — read shopper chats in wp-admin, pause the AI and reply as a human
* **Sales analytics** — revenue, add-to-cart and conversion attributed to chat

= Safety =

Every conversation passes through a fixed policy layer that cannot be switched
off. The assistant stays on the subject of your store, refuses to reveal system
prompts or credentials, obtains store data only through defined tools, and
declines illegal or unethical requests. Replies are filtered before they reach
the browser.

= Built for WooCommerce =

Product data is read through the WooCommerce REST API, and shipping and payment
options through WooCommerce's own hooks — never by querying WooCommerce tables
directly. The plugin is compatible with High-Performance Order Storage (HPOS).

= Trademark notice =

Extraordinary AI Shopping Assistant for WooCommerce is an independent product
and is **not affiliated with, endorsed by, or sponsored by** WooCommerce,
Automattic Inc., OpenAI, or F5, Inc. "WooCommerce" and "OpenAI" are used only to describe
the software this plugin works with, and remain the trademarks of their
respective owners.

== Third-Party Services ==

This plugin relies on external services to function. By activating it and using
the assistant, data from your site is transmitted to the services below. If you
are not comfortable with this, do not use the plugin.

**1. Extraordinary AI Shopping Assistant Gateway** — https://chat.f5digitalmarketing.com

The service that holds the AI provider credentials, verifies your licence, meters
your token usage, and streams the assistant's replies back to your site.

*Data sent, and when:*

* On every shopper chat turn: the shopper's message, a trimmed history of that conversation, relevant excerpts from your uploaded knowledge-base documents, a compact summary of the products and cart being discussed (ids, names, prices, quantities), your licence key, your site URL, and the plugin version.
* When a signed-in shopper asks about their own orders: that shopper's order numbers, statuses, dates, totals, currency, and the names and quantities of the items ordered. Shipping addresses and per-line totals are deliberately left out.
* When you upload a knowledge-base document: the extracted text of that document, so it can be turned into embeddings.

Shopper names, email addresses and payment details are **not** sent.

Terms of service: https://f5digitalmarketing.com/software/terms/
Privacy policy: https://f5digitalmarketing.com/software/privacy/

**2. OpenAI** — https://openai.com

The gateway forwards the prompt content described above to the OpenAI API to
generate replies and embeddings. This plugin never contacts OpenAI directly and
never holds an OpenAI key.

Terms of service: https://openai.com/policies/row-terms-of-use
Privacy policy: https://openai.com/policies/row-privacy-policy

**3. Licence servers** — https://f5digitalmarketing.com/software and https://www.estudarti.com.br

The storefronts that issue and validate subscriptions. Your plugin talks to
whichever one issued your key.

*Data sent, and when:* your licence key, your site URL and the plugin version —
when you activate a licence, once a day on an automatic re-validation, and when
you deactivate.

Terms of service: https://f5digitalmarketing.com/software/terms/ and https://www.estudarti.com.br/termos-de-uso-software/
Privacy policy: https://f5digitalmarketing.com/software/privacy/ and https://www.estudarti.com.br/politica-de-privacidade-software/

**Data stored on your own site**

Conversations — including those held by visitors who are not signed in — are
stored in your site's database so you can read them in the Conversations screen.
You are the controller of that data and should describe it in your own privacy
policy. The plugin adds suggested wording under **Settings → Privacy**, and
supports WordPress's personal-data export and erase requests for signed-in
customers.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. You will land on the setup screen. Click **Get your free licence**, which opens the storefront in a new tab.
3. Create your account and complete the free signup. No payment card is required.
4. Copy the licence key from the confirmation page or email.
5. Return to the setup screen, paste the key, and click **Activate**.
6. Use **Send test message** to confirm the assistant answers.

The chat launcher is added to every storefront page automatically — there is no
shortcode to place. Use the `[aise_buy_with_ai]` shortcode only if you additionally
want a dedicated full-page assistant on a page of your choosing.

Optional next steps: upload documents under **Knowledge Base** so answers come
from your own policies, and set a persona under **Settings → Assistant**.

== Frequently Asked Questions ==

= Do I need an OpenAI API key? =

No. You never handle an AI provider key. The key lives on the vendor's gateway,
which is one of the main reasons the plugin works this way.

= Does the plugin work without a licence? =

No. All AI processing happens on the vendor's servers, so the assistant cannot
answer without an account. The free plan exists precisely so that this costs
nothing to try: 800,000 tokens a month, no payment card.

= Is the free plan really free? =

Yes. One store, three knowledge-base documents, 800,000 tokens a month, and no
card. The free plan may be used on one store permanently — local, staging and
development hostnames are exempt, so trying it on a staging copy does not use up
your store's allowance.

= What data leaves my site? =

See the Third-Party Services section above, which lists every destination and
exactly what is sent to it.

= Are shopper conversations stored? =

Yes, on your own site, so you can read them in the Conversations screen and reply
as a human. They are also covered by WordPress's export and erase tools for
signed-in customers.

= Is this a chatbot, a live chat plugin, or a product recommendation plugin? =

All three, for a store. It answers as an AI chatbot by default, recommends
products from the shopper's own purchase history, and lets you take over any
conversation yourself from the Messages inbox — pause the AI and reply as a
human, like a live chat plugin. What it adds over any of them is that the
shopper can complete the purchase in the conversation.

= Does it use ChatGPT or my own OpenAI account? =

The assistant runs on OpenAI models through our gateway. You never create an
OpenAI account, never paste an API key, and never receive a bill from an AI
provider — your plan covers it.

= Can the assistant be used as a general-purpose chatbot? =

No, by design. A fixed policy layer keeps it to shopping and store support, and
it will decline off-topic requests. This cannot be disabled, only extended.

= Which file types can the knowledge base read? =

PDF, Word (.docx), Excel (.xlsx), CSV, TXT and Markdown. Legacy binary .doc and
.xls are not supported — save them as .docx/.xlsx first. Scanned PDFs that
contain only images have no text layer and are rejected with a message saying so.

= How do replies arrive token by token? =

Every request the plugin makes goes through the WordPress HTTP API. The reply is
sent back as Server-Sent Events, and the plugin reads it as it arrives from the
`requests-request.progress` action WordPress fires for each block of the
response body, so nothing opens a connection of its own. On a host where no such
block is reported, the reply simply appears in one piece instead of word by word.

= Does it work with High-Performance Order Storage? =

Yes. HPOS compatibility is declared, and order data is read through WooCommerce's
own APIs.

== Screenshots ==

1. The storefront assistant helping a shopper choose a product, with add to cart and checkout inside the chat.
2. The full-screen interface, with the conversation history and the live cart side by side.
3. The search-bar launcher on a shop page — one of three storefront layouts.
4. Appearance settings: storefront interface, launcher style and colour palette.
5. Knowledge base — upload documents to ground the assistant's answers.
6. Conversations inbox, with the option to pause the AI and reply as a human.
7. Sales analytics attributed to chat.

== Changelog ==

= 1.0.5 =
* Chat replies now stream through the WordPress HTTP API instead of a direct cURL connection. Nothing changes on screen; the plugin no longer opens a connection of its own, so hosts keep control of proxies, TLS and request filters.

= 1.0.4 =
* Renamed: the plugin is now **Extraordinary AI Shopping Assistant for WooCommerce**. Your settings, licence, knowledge base and stored conversations are unchanged.

= 1.0.2 =
* Renamed: the plugin carries a new name. Your settings, licence and stored conversations are unchanged.
* **Action needed if you used the shortcode:** it is now `[aise_buy_with_ai]`. Update any page carrying the old `[buy_with_ai]`. The automatic chat launcher is unaffected, and most stores use no shortcode at all.
* Admin notices are narrower and every one of them can now be dismissed for good. The plugin no longer posts notices on WooCommerce's own screens, and the 75% token warning no longer carries a plan call to action.
* Updated the bundled Alpine.js to 3.17.1.
* Removed a function deprecated in PHP 8 from the Word and Excel document parsers.
* Translations now come from translate.wordpress.org instead of being bundled with the plugin.

= 1.0.1 =
* Fixed: a fatal error ("Class AISE\Security\Crypto not found") could be shown on the Plugins or Updates screen in the moment right after the plugin updated itself. The update had already completed and reloading the page cleared it, but the error looked like a broken site. The update check now stays out of that window, and the class loader no longer gives up when the plugin's own directory has just been replaced underneath it.

= 1.0.0 =
* The stored licence key is now authenticated as well as encrypted; keys saved by earlier versions keep working and are upgraded the next time settings are saved.
* Added rate limiting to the chat, cart, history and message endpoints.
* Hardened knowledge-base document parsing against malformed and hostile DOCX, XLSX and PDF files.
* The compliance guardrails are now also enforced on the vendor gateway, so they cannot be bypassed by bypassing the plugin.
* Catalogue search now filters on a real price range and retries singular word forms, so requests like "shirts under $200" return matching products instead of unrelated ones.

= 0.4.4 =
* Fixed: asking for a specific kind of product with a budget (e.g. "shirts under $200") could still show unrelated products as cards, because the recommendation tool has no way to filter by type or price. The assistant now uses the catalogue search with real min/max price filtering instead.
* Fixed: a plural search term (e.g. "shirts") could report "no results" even when matching products existed under a singular name (e.g. "Shirt"). The catalogue search now retries with the singular form before giving up.

= 0.4.3 =
* First WordPress.org release.
* New first-run setup screen with a guided licence activation and a built-in test message.
* Settings are now editable before a licence is activated.
* The "no licence" admin notice is dismissible and limited to relevant screens.
* Added personal-data export and erase support, plus suggested privacy policy text.
* Free-plan claims now skip local, staging and development hostnames.

== Upgrade Notice ==

= 1.0.5 =
Chat replies now stream through the WordPress HTTP API. No action needed.

= 1.0.4 =
The plugin has been renamed to Extraordinary AI Shopping Assistant for WooCommerce. Nothing needs attention: your settings, licence and conversations carry over untouched.

= 1.0.2 =
If you placed the [buy_with_ai] shortcode on a page, change it to [aise_buy_with_ai]; nothing else needs attention.

= 1.0.1 =
Fixes the "Class ... not found" error that could appear on the update screen immediately after updating.

= 1.0.0 =
Security hardening for the stored licence key, document parsing and the chat endpoints, plus better catalogue search.

= 0.4.4 =
Fixes product recommendations showing unrelated items and search missing plural-vs-singular matches.

= 0.4.3 =
First WordPress.org release.
