=== DRESSX ===
Contributors: dressx
Tags: woocommerce, virtual try-on, ai, fashion, fitting room
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Add an AI virtual try-on button to your WooCommerce product pages, powered by the DressX try-on service.

== Description ==

DressX adds a "Try On" button to your WooCommerce product pages. Shoppers upload a photo and see how the product looks on them, generated by the DressX AI try-on service.

The plugin renders a configurable button on the single product page (PDP). When a shopper starts a try-on, the product image and the shopper's uploaded photo are sent to the DressX service, which returns a generated try-on image (and optionally a short video).

**Features**

* Adds a "Try On" button to WooCommerce product pages (PDP).
* Configurable button placement (choose the WooCommerce hook and priority).
* Choose which product image is used for the try-on (featured image or a gallery image by index).
* Sends a configurable source and a per-store identifier (store_id) so try-ons can be attributed to your store.
* Pulls product brand from common WooCommerce "brand" taxonomies when available.
* No account or theme edits required beyond activating the plugin and configuring the settings page.

**Important:** This plugin requires the external DressX service to function. It is a connector to a third-party SaaS; the actual try-on generation happens on DressX servers. See the "External services" section below.

== External services ==

This plugin connects to the DressX virtual try-on service to generate try-on images and videos. The plugin cannot produce try-ons locally; the external service is required for the plugin's core function.

1. DressX Try-On API - https://api.dressxagent.com

* What it is used for: to create a virtual try-on and to poll its status/result.
* What data is sent, and when: when a shopper starts a try-on on a product page, the plugin (via the loaded try-on widget) sends the product image URL, the shopper's uploaded photo, and identifiers (source, store_id, product id/sku/handle, locale) to the DressX API. Data is sent only when the shopper actively initiates a try-on.

2. DressX widget host - https://dressxagent.com

* What it is used for: to load the try-on widget JavaScript that renders the try-on modal and handles the upload/preview flow on the product page.
* What data is sent, and when: a standard browser request for the script is made on product pages where the button is enabled. The script then communicates with the DressX Try-On API as described above.

3. DressX media host - https://api.dressx.com

* What it is used for: to load and display try-on and product media (images) used by the widget.
* What data is sent, and when: standard browser requests for media are made while the shopper is using the try-on modal. No shopper-identifying data beyond the media request itself is sent.

The Try-On API and widget host endpoints are configurable on the plugin settings page (for example, to point to a staging environment).

By using this plugin you (the site owner) and your shoppers agree to the DressX Terms of Service and Privacy Policy:

* Terms of Service: https://dressx.com/policies/terms-of-service
* Privacy Policy: https://dressx.com/pages/privacy-policy

== Installation ==

1. Install and activate WooCommerce.
2. Upload the plugin to /wp-content/plugins/dressx, or install it from the Plugins screen in WordPress.
3. Activate **DressX** through the Plugins screen.
4. Go to **WooCommerce -> DressX** and configure the settings (source, store id, button placement, image source).
5. Open any product page to see the "Try On" button.

== Frequently Asked Questions ==

= Does this plugin work without WooCommerce? =

No. WooCommerce must be installed and active. The button is rendered on WooCommerce product pages.

= Where does the try-on generation happen? =

On the DressX service. The plugin is a connector: it sends the product image and the shopper's photo to the DressX API and displays the result. See the "External services" section.

= Where is the button shown? =

On the single product page (PDP). You can choose the exact placement (WooCommerce hook and priority) on the settings page.

= Which product image is used? =

By default the featured (main) image. You can switch to a specific gallery image by index on the settings page.

= Is shopper data stored on my site? =

No. The plugin stores only its settings option on your site. The uploaded photo and try-on results are handled by the DressX service.

= Can I point the plugin at a staging environment? =

Yes. The API base URL and script base URL are configurable on the settings page, so you can point the plugin at a DressX staging environment for testing. Leave them at their defaults for normal production use.

== Changelog ==

= 1.0.1 =
* Initial public release: AI virtual try-on button on WooCommerce product pages, with configurable button placement, product image source, and source/store identifiers.

== Upgrade Notice ==

= 1.0.1 =
Initial public release.
