=== Aube AI — AI Chat & Support ===
Contributors: aubeai
Tags: ai, chat, support, chatbot, woocommerce
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 1.0.1
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered chat widget that answers customer questions 24/7, looks up WooCommerce orders, and escalates to you when needed.

== Description ==

**Aube AI** adds a smart chat widget to your WordPress site. Customers can ask questions about your products, policies, orders, and more — the AI answers instantly using your knowledge base.

= Key Features =

* **24/7 AI support** — Answers product, policy, and shipping questions automatically
* **WooCommerce order lookup** — Customers can check order status and tracking without contacting you
* **Knowledge base** — Add your own FAQs, return policies, and custom answers
* **Multilingual** — Responds in the customer's language automatically
* **Refund requests** — Customers can initiate refunds through the chat; you approve from your dashboard
* **Live handoff** — Escalates to you when the AI can't help
* **Free plan available** — 50 AI conversations per month at no cost

= How It Works =

1. Register at [wp.aubeai.io](https://wp.aubeai.io)
2. Install this plugin and enter your Widget Token
3. The AI chat widget appears on your site immediately

= External Service =

Aube AI is a hosted software-as-a-service product. This plugin connects your WordPress site to Aube AI's hosted service at `https://api.aubeai.io` and dashboard at `https://wp.aubeai.io`.

The widget JavaScript is bundled with this plugin. The widget and plugin send requests to Aube AI's API to load widget settings, create chat sessions, send customer messages, receive AI responses, record feedback, and, when WooCommerce is connected, answer product, inventory, order, and refund-request questions.

Data sent to Aube AI can include your site URL, widget token, chat messages, conversation metadata, product names and inventory data, customer-provided order identifiers, customer-provided email addresses, order details needed to answer order-status questions, and refund-request details submitted by the customer. WooCommerce REST API credentials are entered in the Aube AI dashboard, stored by Aube AI, and are not saved in WordPress by this plugin.

Use of the service is governed by the Aube AI Terms of Service and Privacy Policy:

* Terms of Service: https://aubeai.io/terms
* Privacy Policy: https://aubeai.io/privacy

= Source Code and Build =

The source code used to generate the bundled widget file at `assets/js/widget.wordpress.js` is included in this plugin under `source/widget/`.

To rebuild the WordPress widget bundle:

1. Change to the `source/widget/` directory
2. Run `npm ci`
3. Run `npm run build:wp`
4. Copy `dist/widget.wordpress.js` to `assets/js/widget.wordpress.js`

The build uses Vite, TypeScript, Preact, and Terser as declared in `source/widget/package.json`.

= WooCommerce Integration =

When WooCommerce is active, Aube AI can:
* Look up orders by order number or email
* Check product stock and variants
* Process refund requests (with merchant approval)

To enable this, connect WooCommerce from your [Aube AI dashboard](https://wp.aubeai.io) under Settings. Your API credentials are stored securely in the Aube AI cloud and are never saved in WordPress.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/aube-ai/` or install via **Plugins → Add New**
2. Activate the plugin
3. Register at [wp.aubeai.io](https://wp.aubeai.io) if you haven't already
4. Open **Aube AI** in the WordPress admin sidebar and paste your Widget Token from the dashboard
5. Save — the chat widget is now live on your site

**Optional — WooCommerce integration:** After the plugin is active, log in to [wp.aubeai.io](https://wp.aubeai.io), go to Settings, and connect your WooCommerce store with your REST API credentials. This enables order lookup, product search, and refund requests.

== Screenshots ==

1. The chat widget open on a WooCommerce product page
2. Aube AI dashboard — Conversations view
3. Aube AI dashboard — Knowledge Base editor
4. Aube AI dashboard — Analytics overview
5. Plugin settings page — Widget Token entry

== Frequently Asked Questions ==

= Do I need a WooCommerce store? =

No. Aube AI works on any WordPress site. WooCommerce integration is optional and unlocks order lookup features.

= Where do I get my Widget Token? =

Register at [wp.aubeai.io](https://wp.aubeai.io), complete setup, and find the token under Settings.

= Is there a free plan? =

Yes — 50 AI conversations per month for free, no credit card required.

= How do I add custom answers? =

Log in to your dashboard at [wp.aubeai.io](https://wp.aubeai.io) and use the Knowledge Base section.

= Where is my data stored? =

Conversation data is stored on Aube AI's servers (Google Cloud, US region). This plugin stores only the widget token and activation status in your WordPress options table.

== Changelog ==

= 1.0.1 =
* Documented and included the widget source code and build steps for the bundled JavaScript file.

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.1 =
Includes the source code and build instructions for the bundled widget JavaScript.

= 1.0.0 =
Initial release.
