=== MaxSellora ===
Contributors: itmerce
Tags: ai, chatbot, woocommerce, order tracking, customer support
Requires at least: 6.0
Tested up to: 6.9
Stable tag: 1.0.1
Requires PHP: 8.0
Requires Plugins: woocommerce
WC requires at least: 8.0
WC tested up to: 10.7.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI sales assistant for WooCommerce. One-click setup, zero config. Turn visitors into buyers automatically.

== Description ==

**MaxSellora** adds a beautiful floating chat assistant to your WooCommerce store that feels natural and helpful for real shoppers. Visitors can quickly find the right products, compare options, check availability, track their orders, and add items to cart without friction. Behind the scenes, MaxSellora is built and continuously enhanced with the latest AI technologies so answers stay fast, relevant, and reliable. And when a customer wants extra reassurance, the conversation moves seamlessly to a live human operator with no interruption.

This plugin connects to the MaxSellora external API at `https://woocommerce.chatbot.shop-aiplugin.com` to process visitor messages and generate AI replies. By installing the plugin you accept that visitor chat data is sent to that service. See the **External Services** and **Privacy** sections below, and the full Privacy Policy at https://shop-aiplugin.com/privacy and Terms of Service at https://shop-aiplugin.com/terms.

**What customers can do:**

* Search for products by name, category, or feature
* Compare items side by side
* Check real-time stock availability
* Track order status and shipping
* Add products to cart directly from chat

**More features:**

* Multi-language support (English, Persian, Arabic, German) — auto-detected
* Customizable widget color and position (bottom-left or bottom-right)
* Live chat escalation to human operators — available on all plans
* WooCommerce catalog sync so the AI always has up-to-date product data
* Demo mode for testing without an account (fully local, no data sent)

**Plans and Pricing:**

* **Demo mode** — Try the widget before signing up. Runs entirely in mock mode on your server; no data is sent to the MaxSellora API.
* **Free plan** — 10 AI-powered messages included (lifetime total). Once the limit is reached, conversations are automatically routed to your human operators so no customer is ever left without support.
* **Paid plans** — Higher or unlimited AI message quotas. Manage from your MaxSellora dashboard at https://woocommerce.chatbot.shop-aiplugin.com.

**Human operator support (all plans):**

You can define operators from the MaxSellora dashboard. Operators can initiate a chat with any customer at any time, or customers can request a human at any point in the conversation. When an AI plan limit is reached, the chat is handed off to an operator automatically — no customer is dropped.

**Requirements:**

* WordPress 6.0 or higher
* WooCommerce 8.0 or higher
* PHP 8.0 or higher

== Installation ==

1. Upload the `maxsellora` folder to `/wp-content/plugins/` or install through the WordPress plugin installer.
2. Activate the plugin through the **Plugins** menu.
3. Go to **WooCommerce → MaxSellora**.
 
**Recommended — Automatic setup (Free plan):**
 
Click **Activate Free Plan**. The plugin configures itself automatically: API connection, dashboard link, and WooCommerce REST API keys are all set up without any manual steps. When your free plan messages are used up, simply purchase a paid plan from your MaxSellora dashboard — all existing settings carry over and everything keeps working with no reconfiguration needed.
 
**Alternative — Manual setup:**
 
If you prefer to configure the connection yourself, follow these steps:
 
1. **Create an Account** — Go to the MaxSellora registration page at https://woocommerce.chatbot.shop-aiplugin.com and create your admin account. This will be your main dashboard login.
2. **Add a Store** — Navigate to **Stores** in the sidebar and click **Add Store**. Fill in your store name and WooCommerce credentials.
3. **Get WooCommerce API Keys** — In your WordPress admin, go to **WooCommerce → Settings → Advanced → REST API**. Click **Add Key**, set permissions to **Read/Write**, and copy the Consumer Key and Consumer Secret.
4. **Generate a MaxSellora API Key** — In the MaxSellora dashboard, go to **API Keys** and create a new key for your store. Copy it — you will need it in the next step.
5. **Configure the Plugin** — In WordPress admin, go to **WooCommerce → MaxSellora**. Enter the API Key from step 4
6. Click **Save Changes**, then **Test Connection**.
7. **Index Your Products** — Click **Reindex Products** in the plugin settings to sync your WooCommerce catalog with the AI engine.
 
**Tip:** After adding new products to WooCommerce, click **Reindex Products** again to keep the AI's knowledge base up to date.
 
To try the plugin before signing up, enable **Demo mode** from **WooCommerce → MaxSellora**. Demo mode runs entirely on your server — no data is sent anywhere.

== Frequently Asked Questions ==

= What is Demo mode? =

Demo mode lets you test the chat widget before creating a MaxSellora account. It runs entirely on your own server using pre-defined sample responses — no data is sent to any external API.

= What is included in the Free plan? =

The Free plan includes **10 AI-powered messages in total** (lifetime). Once that limit is reached, all new conversations are automatically routed to your human operators. You can upgrade at any time from your MaxSellora dashboard.

= What happens when an AI plan limit is reached? =

The customer is seamlessly transferred to a human operator. No error is shown and no conversation is dropped. If no operator is online, the customer sees your configured offline message.

= Do I need an account to use the plugin? =

You need a MaxSellora account to use AI features and human operator management. Demo mode is available without an account. Sign up and connect your store from **WooCommerce → MaxSellora**.

= Can I customize the chat widget? =

Yes. Under **WooCommerce → MaxSellora** you can change the widget color and position (bottom-left or bottom-right).

= Does it support multiple languages? =

Yes. Built-in support for English, Persian, Arabic, and German. Language is auto-detected from your store settings.

= How do I sync products? =

Go to **WooCommerce → MaxSellora** and click **Reindex Products**.

= How do I add human operators? =

Log in to your MaxSellora dashboard at https://woocommerce.chatbot.shop-aiplugin.com, go to **Operators**, and add your team members. Operators can chat with customers at any time from the dashboard.

== Screenshots ==

1. MaxSellora chat widget on the store frontend — product search
2. MaxSellora settings page under WooCommerce → MaxSellora
3. A sample chat conversation showing product comparison and add-to-cart

== External Services ==

This plugin sends data to one external API endpoint.

**Endpoint:**
`https://woocommerce.chatbot.shop-aiplugin.com`

**Data sent:**
* Chat message text
* Session identifier (stored in browser `localStorage`)
* Page URL
* Visitor IP address
* Customer name and email (when provided in the guest form or from a logged-in WooCommerce account)
* WooCommerce product data (title, description, price, stock, SKU, categories, attributes, gallery URLs, language) — sent only when the merchant runs **Reindex Products** or saves a product

**When data is sent:**
* Only when a visitor sends a chat message while the widget is active
* Only when the merchant manually triggers a product reindex
* **No data is ever sent in Demo mode**

**Privacy policy:** https://shop-aiplugin.com/privacy
**Terms of service:** https://shop-aiplugin.com/terms

== Privacy ==

= What personal data does this plugin collect? =

The plugin does not store visitor data in your WordPress database. When a visitor uses the chat widget, the following data may be transmitted to `https://woocommerce.chatbot.shop-aiplugin.com`: chat message text, page URL, visitor IP address, optionally the customer's name and email (from the guest form or a logged-in WooCommerce account), and a session identifier stored in the browser's `localStorage`.

In **Demo mode**, no data is transmitted anywhere.

= What about WooCommerce product data? =

When the merchant runs **Reindex Products** (or saves a product while the plugin is connected), the plugin sends WooCommerce product data — title, description, price, stock, SKU, categories, attributes, gallery URLs, and language — to the MaxSellora API so the assistant can answer product questions accurately.

= How do I declare this in my privacy policy? =

The plugin automatically registers a suggested privacy snippet via `wp_add_privacy_policy_content()`. You can copy it into your site's privacy policy from **Tools → Privacy → Policy Guide**. The full upstream policy is at https://shop-aiplugin.com/privacy.

= How do I delete a customer's chat history? =

The merchant can remove conversations from the MaxSellora dashboard (Conversations → Delete). This covers GDPR right-to-erasure requests. Deactivating the plugin immediately stops all further data transmission.

== License and Legal ==

This plugin is licensed under GPLv2 or later and is fully GPL-compatible. The MaxSellora SaaS backend is a proprietary service governed by the Terms of Service at https://shop-aiplugin.com/terms.

== Changelog ==

= 1.0.0 =
* Initial release — storefront AI chat, order tracking, multi-language, product sync, add-to-cart from chat, live operator handoff.
* Demo mode added: fully local mock responses, zero external API calls.
* Free plan: 10 lifetime AI messages; automatic operator handoff when limit is reached.
* Privacy: suggested privacy snippet registered via `wp_add_privacy_policy_content()`.
* Security: MaxSellora API key encrypted at rest in `wp_options`, masked in admin UI, SSL enforced on all outbound requests (relaxed only for localhost dev), settings inputs sanitized.