=== ZORY AI ===
Contributors: zory1
Tags: woocommerce, ai, shopping assistant, product search, chatbot
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

ZORY's AI shopping assistant for WooCommerce: it helps your shoppers find, compare and choose your products.

== Description ==

ZORY AI adds an AI shopping assistant to your WooCommerce storefront. Shoppers ask in their own words, in English or Arabic, and the assistant answers from your own catalogue: it finds products by style, colour, size or budget, compares them, suggests alternatives and links straight to the product page.

What the plugin does:

* **Connects your store to ZORY** with WooCommerce's own key approval screen. You approve read and write access, enter the email your ZORY login is sent to, and your products are imported.
* **Keeps ZORY up to date** through WooCommerce webhooks: a product or variation saved, stock taken by an order, a product moved to the bin or restored.
* **Adds the assistant to your storefront** while your ZORY plan is active, with an on/off switch under ZORY AI > Settings.
* **Shows your plan** under ZORY AI > Plan: buy, add design generations or remove the "Powered by Zory" badge, pay by card (MADA, Visa, Mastercard, American Express) or Apple Pay, and cancel.
* **Reports results**: product views, adds to cart, checkouts and purchases of products shoppers reached through ZORY, in your ZORY business portal.

The plugin's screens are in English and Arabic.

ZORY AI is a service: a ZORY plan is needed for the assistant to appear on your storefront. Plans and prices are listed under ZORY AI > Plan.

== Installation ==

1. Install and activate WooCommerce. Your site must be served over HTTPS, and Settings > Permalinks must not be "Plain".
2. Install and activate ZORY AI from Plugins > Add New.
3. Open ZORY AI > Settings and press **Connect to ZORY**. Approve the access WooCommerce asks for, then enter your email.
4. Sign in to the ZORY business portal with the login emailed to you.
5. Buy a plan under ZORY AI > Plan, then tick **Show ZORY on my storefront** under ZORY AI > Settings.

== Frequently Asked Questions ==

= Does it change my products or orders? =

No. ZORY reads your products and store settings, and creates the webhooks it needs. It keeps on each order, in a field named `zory_clicks`, which of its products the shopper reached through ZORY. It never edits your products, prices or orders.

= What happens if I deactivate or delete the plugin? =

ZORY is told, removes your store and its products from ZORY, and stops your plan renewing (it stays active until the end of the period you paid for). Your ZORY account stays. The "ZORY AI" API key remains under WooCommerce > Settings > Advanced > REST API for you to revoke.

= Which payment methods can I use for my plan? =

Cards (MADA, Visa, Mastercard, American Express) on the payment page inside WordPress, or Apple Pay on ZORY's page in Safari on an Apple device. Payments are processed by HyperPay; card details never reach ZORY or WordPress.

= Does the plugin add a "Powered by Zory" credit to my site? =

No. The plugin adds no credit or link to your site. The assistant is drawn by ZORY's service, which shows a small "Powered by Zory" mark inside it, as part of the service's own output. You can have ZORY remove it under ZORY AI > Plan.

= Does it work with the block checkout and HPOS? =

Yes. The plugin supports WooCommerce's block cart and checkout and High-Performance Order Storage.

== External services ==

This plugin connects your store to ZORY, an AI shopping assistant service run by ZORY (https://zory.ai). It also uses HyperPay to take payment for ZORY plans. Nothing is sent to either service until you press Connect to ZORY.

**ZORY** (api.zory.ai; ai-agent.zory.ai, where the assistant itself is served from; business.zory.ai for Apple Pay):

* When you connect: your site's address, and the WooCommerce REST API key you approve. ZORY uses the key to read your products, store settings and reviews, to create the webhooks it needs, and to hand the plugin the secret it signs its requests with. You enter the email your ZORY login is sent to.
* While connected: WooCommerce sends ZORY webhooks when a product is created, changed, moved to the bin or restored, and when an order is created or changed. From orders, ZORY uses only the products, quantities, totals and the `zory_clicks` field; it stores nothing about the shopper.
* On your storefront, while the assistant is switched on: every page loads ZORY's script from api.zory.ai, which sends ZORY your shop's address, and, while your plan is active, loads the assistant from ai-agent.zory.ai. What shoppers type to the assistant is sent to ZORY to answer them. A shopper who opens a product through ZORY has ZORY's own click ids kept in their browser (local storage and a `zory_clicks` cookie) and reported to ZORY with that product's views, adds to cart, checkouts and purchases. These reports carry no name, email or address of the shopper.
* In WP admin: the Plan page asks ZORY for your plan and the plans on sale; buying, paying and cancelling are asked of ZORY.
* When you deactivate the plugin: ZORY is told, so it can remove your store.

ZORY's terms: https://zory.ai/terms-and-conditions
ZORY's privacy policy: https://business.zory.ai/app/privacy-policy

**HyperPay** (oppwa.com), when you pay for a plan by card in WP admin: the payment page loads HyperPay's card form, and your card details are entered into it directly. ZORY sends HyperPay the amount, your email and the billing address you give.

HyperPay's privacy policy: https://www.hyperpay.com/privacy-policy/

== Screenshots ==

1. ZORY AI > Settings: connect your store and switch the assistant on.
2. ZORY AI > Plan: your plan, the plans on sale and the add-ons.
3. Paying for a plan inside WordPress, by card or Apple Pay.
4. The ZORY assistant on a WooCommerce storefront.

== Changelog ==

= 1.0.0 =
* First release: connect, product sync by webhooks, the storefront assistant, plans paid by card or Apple Pay, purchase reporting, English and Arabic.

== Upgrade Notice ==

= 1.0.0 =
First release.
