=== Dimi ===
Contributors: aiproductadvisor
Tags: woocommerce, chat, ai, product recommendations, assistant
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect your WooCommerce store to the Dimi chat widget with a single pairing code — no API keys to paste, no theme code.

== Description ==

Dimi adds an AI shopping assistant (chat widget) to your WooCommerce store. Visitors describe what they need; the assistant recommends products from your own catalog, answers FAQs, and can hand over to a human operator.

This plugin is the 1-click onboarding companion for the Dimi SaaS platform. It automates the two steps merchants otherwise do by hand:

* generates a **read-only** WooCommerce REST API key and registers it with the platform (write-capable keys are rejected by the server);
* injects the chat widget script on your storefront — no theme editing.

You need an Dimi account. Connecting takes one pairing code, generated in your dashboard (Settings → Integration), valid 15 minutes, single-use.

Features:

* one-field connect (pairing code) — keys and widget handled automatically
* connection status: store, synced products, last sync
* widget on/off toggle (visibility only — the connection stays)
* disconnect: revokes the local API key and notifies the platform
* uninstall cleanup: key revoked, all options removed

== External services ==

This plugin connects to the **Dimi** service (the backend URL shown on the settings page). It sends:

* on connect (after your explicit consent checkbox): the pairing code you enter, your store URL, and a newly generated **read-only** WooCommerce REST API key;
* periodically, server-side, the platform uses that key to read your **product catalog** (names, prices, stock, descriptions, images) to power recommendations;
* on the settings page: the widget token, to display connection status;
* on your storefront: the chat widget script is loaded from the platform, and visitor chat messages are processed by the platform to generate replies.

No customer or order data is sent by this plugin, and the read-only key cannot modify your store. See the service's Privacy Policy (linked on the settings page) and Terms for details.

== Installation ==

1. Upload the plugin ZIP via Plugins → Add New → Upload, then activate it (WooCommerce must be active).
2. In your Dimi dashboard: Settings → Integration → "Generate plugin pairing code".
3. In WordPress: WooCommerce → Dimi → paste the code, tick the consent box, press Connect.
4. Done — products sync and the chat widget appears on your storefront.

== Changelog ==

= 0.1.0 =
* First release: pairing-code connect, automatic read-only key, widget auto-inject, on/off toggle, status, disconnect, uninstall cleanup.
