=== Raychat AI ===
Contributors: raychat
Tags: woocommerce, chatbot, ai, product sync, live chat
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sync your WooCommerce products with Raychat so the Raychat AI assistant can answer customer questions about your catalog.

== Description ==

Raychat AI connects your WooCommerce store to your [Raychat](https://raychat.io) account. It sends your published products to Raychat so that the Raychat AI assistant can answer your customers' questions about products, prices and availability.

**Features**

* One-click synchronization of all published WooCommerce products.
* Automatic background updates when a product is created, edited, published, unpublished, deleted, or its stock changes.
* Supports simple and variable products, including attributes, prices, sale prices, stock quantity and images.
* Prices in Iranian Rial (IRR) are converted to Toman (IRT) automatically.
* Background syncs run through the WooCommerce Action Scheduler, so saving a product or completing a checkout is never slowed down.

A Raychat account and API key are required. WooCommerce must be installed and active.

== External services ==

This plugin connects to the Raychat API (`https://raychat.io/ecommerce/api`), a service provided by Raychat. It is required for the plugin to work: it is how your product catalog reaches the Raychat AI assistant.

**What is sent and when**

Nothing is sent until you save a Raychat API key in the plugin settings. After that, product data is sent:

* when you click "Synchronize Products" (all published products), and
* automatically in the background after a product is created, updated, published, unpublished, deleted, or its stock changes.

For each published product the plugin sends: product name, description, permalink, image URLs, attributes, regular price, current price, stock quantity, creation and modification dates, the WooCommerce product ID, and an identifier derived from the product ID. For variable products the same details are sent for each variation. Your Raychat API key is sent in a request header to authenticate each request.

No customer, order or visitor data is sent by this plugin.

This service is provided by Raychat: [Terms of Use](https://raychat.io/license), [Security and Privacy](https://raychat.io/security).

== Installation ==

1. Make sure WooCommerce is installed and active.
2. Install Raychat AI from the Plugins screen, or upload the `raychat-ai` folder to `/wp-content/plugins/`.
3. Activate the plugin.
4. Go to **Raychat AI** in the admin menu, paste your Raychat API key and click **Save API Key**.
5. Click **Synchronize Products** to send your catalog to Raychat.

== Frequently Asked Questions ==

= Where do I find my API key? =

In your Raychat dashboard. If you cannot find it, contact Raychat support.

= Do I need to click "Synchronize Products" every time I change a product? =

No. After the first synchronization, changes are sent to Raychat automatically in the background, usually within a minute.

= Which products are synchronized? =

Published products only. Drafts, private and trashed products are not sent.

= A sync failed. Where can I see why? =

Errors are recorded in **WooCommerce > Status > Logs** under the source `raychat-ai`. The API key and product data are never written to the log.

= What happens to my data when I delete the plugin? =

Deleting the plugin from the Plugins screen removes the saved API key and all other plugin settings from your site. Products already sent to Raychat stay in your Raychat account; manage them from the Raychat dashboard.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
