=== Asisty Connector ===
Contributors: asisty
Tags: woocommerce, webhook, chatbot, ai, automation
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 1.1.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
 
Connect your WooCommerce store to the Asisty AI-Powered Customer Representative chatbot panel with one click. Automatically sets up webhooks and supports multi-item cart links.
 
== Description ==
 
**Asisty Connector** automates all the technical setup required to connect your WooCommerce store to the [Asisty](https://asisty.co) AI chatbot panel.
 
Normally, you would need to create each WooCommerce webhook manually one by one. With this plugin, simply paste the URL and Secret copied from the Asisty panel, click "Set Up Webhooks", and the plugin handles the rest.
 
= Features =
 
* **Automatic webhook setup** — Creates or updates product, order, and coupon webhooks with a single click
* **8 webhooks, 0 manual steps** — product.created/updated/deleted, order.created/updated, coupon.created/updated/deleted
* **Updates existing webhooks** — Safe to re-run; updates existing ones and creates any that are missing
* **Webhook status table** — Instantly see which webhooks are installed or missing
* **Multi-item cart link support** — Add multiple products to cart at once using the `?add-to-cart=10,15,20` format
 
= How It Works =
 
1. Open the **WooCommerce → Settings → Instant Sync** section in your Asisty panel
2. Copy the Webhook URL and Secret
3. Go to **WooCommerce → Asisty Connection** in your WordPress admin
4. Paste the values and click **"Set Up Webhooks"**
 
Changes to products, orders, and coupons in WooCommerce will now sync to the Asisty panel instantly.
 
= Webhooks Installed =
 
* `product.created` — When a new product is added
* `product.updated` — When a product is updated (price, stock, etc.)
* `product.deleted` — When a product is deleted
* `order.created` — When a new order is placed
* `order.updated` — When an order status changes
* `coupon.created` — When a new coupon/campaign is added
* `coupon.updated` — When a coupon is updated
* `coupon.deleted` — When a coupon is deleted
 
= Requirements =
 
* WordPress 6.0 or higher
* WooCommerce 7.0 or higher
* An Asisty account (asisty.co)
 
== Installation ==
 
= Automatic Installation =
 
1. Go to **Plugins → Add New** in your WordPress admin panel
2. Search for "Asisty Connector"
3. Click **Install Now** and then **Activate**
 
= Manual Installation =
 
1. Download the plugin files
2. Upload the `asisty-connector` folder to the `wp-content/plugins/` directory
3. Activate **Asisty Connector** from the **Plugins** page in WordPress admin
 
= Initial Setup =
 
1. Go to **WooCommerce → Asisty Connection**
2. Copy the Webhook URL and Secret from your [Asisty panel](https://app.asisty.co)
3. Fill in the fields and click **"Set Up / Update Webhooks"**
4. Verify the installed webhooks in the status table (green ✓ checkmarks)
 
== Frequently Asked Questions ==
 
= Does it work without WooCommerce? =
 
No. This plugin requires WooCommerce to function. If WooCommerce is not active, the plugin will display a warning and perform no actions.
 
= What happens if I click "Set Up Webhooks" more than once? =
 
It is safe to do so. The plugin detects existing Asisty webhooks and updates them; it does not create duplicate webhooks.
 
= What should I do when I change my Secret? =
 
After generating a new secret in the Asisty panel, come to this page, enter the new secret, and click **"Set Up / Update Webhooks"**. All webhooks will be updated automatically.
 
= How do I use multi-item cart links? =
 
Separate product IDs with commas in the `?add-to-cart=10,15,20` format. To specify quantities, append `&quantity[10]=2&quantity[15]=1`.
 
= What data does the plugin collect? =
 
The plugin does not collect or transmit any user data. It only stores the Webhook URL and Secret you provide in the `wp_options` table of your WordPress database.
 
== Screenshots ==
 
1. Asisty Connection settings page — URL and Secret input fields
2. Webhook status table after setup — showing installed and missing webhooks
 
== Changelog ==
 
= 1.1.0 =
* Added order webhooks (order.created, order.updated)
* Added coupon/campaign webhooks (coupon.created, coupon.updated, coupon.deleted)
* Added webhook status table
* Improved WooCommerce activation check
 
= 1.0.0 =
* Initial release
* Product webhooks (product.created, product.updated, product.deleted)
* Multi-item cart link support
 
== Upgrade Notice ==
 
= 1.1.0 =
Order and coupon webhooks added. After updating, click "Set Up / Update Webhooks" to create the new webhooks.