=== aisthetix - Virtual Try-On for WooCommerce Fashion Stores ===
Contributors: aisthetix
Tags: woocommerce, virtual try-on, fashion, ai, fitting room
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Shoppers see themselves in your clothes and buy with confidence. You see the revenue it earned. Free connector, photos never stored.

== Description ==

Every virtual try-on promises more sales. aisthetix is the one that shows you the real number on your own store.

**Shoppers buy with confidence.** A shopper uploads one photo on your product page and sees the garment rendered onto their own body in seconds. A fitting room on the product page is what turns hesitation into a purchase, and it is aimed squarely at the "order it, guess, send it back" habit that drives fashion returns.

**You see what it earned.** Switch analytics on and the aisthetix dashboard reports your shopper funnel (viewed, tried on, added to cart, purchased), how much more often try-on shoppers went on to buy the same product, and the revenue attributed to those orders. Correlation, not proof of cause, but it is your store's own data instead of a claim on somebody's marketing page.

Industry write-ups quote around 35% more conversions for virtual try-on. We do not ask you to take that number on faith. We measure yours.

This plugin is a thin, free connector to the hosted aisthetix service. It does not run AI on your server: the shopper's browser talks directly to the aisthetix service, so your store stays fast and your PHP workers are never tied up on multi-second AI calls.

**Highlights**

* **See what try-on is worth**: an opt-in dashboard reporting your shopper funnel, try-on lift, and attributed revenue. No other try-on plugin will show you this.
* **Shoppers never install anything**: they upload one photo on the product page and see the result in seconds.
* One-click **Connect aisthetix**: sign in (Google or email code), approve, done. No API keys to copy or paste.
* Works on **simple and variable products**: the try-on follows the selected variation's image automatically.
* **Multiple placements**: automatic (after the Add to cart button), a `[aisthetix_tryon]` shortcode, a Gutenberg block, and a native Elementor widget.
* **Optimizer-friendly**: the loader is registered so it is not delayed or stripped by WP Rocket, LiteSpeed Cache, or Perfmatters.
* **Localized**: includes English and Italian, follows your site locale.
* **Hides itself when paused**: when the store's monthly quota is reached, the try-on entry point simply disappears. No broken button, no nag.

== Privacy & GDPR ==

Your shoppers' privacy is central to this product, and nothing above depends on weakening it.

* **Shopper photos are processed transiently and are never stored.** The photo is uploaded from the shopper's browser directly to the aisthetix service, used only to generate the try-on image, and is not persisted.
* **Photos never touch your WordPress server.** WordPress only injects a small configuration object and a loader script; the image upload and the result both flow between the shopper's browser and the aisthetix service.
* The shopper's uploaded photo and their try-on history live **only in their own browser's local storage**.
* The plugin stores, on your server, two API keys provisioned during Connect: a public (publishable) key that is safe to expose to the browser and a secret key that is used only for server-to-server status checks and is never sent to the browser.

A full privacy disclosure and Data Processing Agreement are available on the aisthetix dashboard. Use of this plugin sends shopper-provided images to the third-party aisthetix service for processing; you should reflect this in your store's privacy policy.

== External services ==

This plugin connects your store to the aisthetix virtual try-on service (the "brain", hosted at woo.aisthetix.fyi). The service is required: the AI try-on is provided remotely and does not run on your WordPress server.

What is sent, and when:

* Shopper photo + garment image, sent from the shopper's browser to https://woo.aisthetix.fyi/api/storefront/tryon, only when the shopper actively starts a try-on (an explicit click, behind the widget's own consent step). The photo is processed transiently to generate the result and is not stored by the service; it lives only in the shopper's own browser storage.
* Connection details, when you (the merchant) click "Connect aisthetix", your site URL, a return URL, and a state token are sent to https://woo.aisthetix.fyi/connect and /api/connect/* to link your store and provision keys. Merchant-initiated.
* Anonymous analytics events (product_viewed, product_added_to_cart, aisthetix_tryon_completed), sent to https://woo.aisthetix.fyi/api/events ONLY if you enable "Anonymous analytics" (off by default) or a consent banner on your site grants analytics/statistics consent. See "Cookies & consent" below.
* Order data (order id, product ids, order value, currency, and an anonymous visitor/customer id), sent to https://woo.aisthetix.fyi/api/storefront/order when an order is paid, ONLY if "Anonymous analytics" is enabled. Used to attribute purchases to prior try-ons.

Service Terms of Service: https://tryon-demo.aisthetix.com/woocommerce/terms
Service Privacy Policy: https://tryon-demo.aisthetix.com/woocommerce/privacy

== Cookies & consent ==

By default this plugin sets NO cookies and sends NO analytics. Nothing is tracked passively. The shopper-initiated try-on still works: it is an explicit action, not passive tracking. This also means the effectiveness dashboard stays empty until you opt in, which is the trade we chose deliberately.

If you enable "Anonymous analytics" under WooCommerce -> aisthetix Try-On (off by default), the plugin:

* Sets a first-party cookie named "aisthetix_vid" on product pages: a random, non-personal visitor id used to attribute a later purchase to an earlier try-on. It is not a login or credential cookie. Lifetime: about 13 months.
* Sends the anonymous analytics and order events described under "External services".

If your site uses a supported consent banner (Cookiebot, Complianz, or Google Consent Mode), the shopper's analytics/statistics choice additionally controls the browser-side events: an explicit grant enables them and an explicit deny suppresses them, regardless of the setting. The first-party cookie and the server-side order event follow the "Anonymous analytics" setting.

== Build from source ==

The storefront widget (assets/widget.js + assets/widget.css) is built from the React + TypeScript source shipped in widget-src/. To reproduce it:

`cd widget-src && npm ci && npm run build`

This emits assets/widget.js and assets/widget.css. See widget-src/BUILD.md for details. All widget runtime dependencies are MIT-licensed (React, React DOM).

== Installation ==

1. Install and activate **WooCommerce** (required).
2. Install and activate **aisthetix Virtual Try-On**.
3. Go to **WooCommerce -> aisthetix Try-On** and click **Connect aisthetix**.
4. Sign in (Google or a 6-digit email code), approve the connection, and choose a plan.
5. The try-on button now appears on your product pages. Adjust placement under the same settings page, or use the `[aisthetix_tryon]` shortcode / Gutenberg block / Elementor widget anywhere you like.

== Frequently Asked Questions ==

= Does this require WooCommerce? =
Yes. The plugin declares WooCommerce as a required plugin and will not run without it.

= How do I know whether try-on is actually making me money? =
That is what the dashboard is for. With analytics enabled, it reports how many shoppers viewed a product, how many tried it on, how many added it to the cart, and how many bought, plus the revenue attributed to orders containing a tried-on product. It tells you what try-on shoppers did, which is not the same as proving try-on made them do it, and it is your own store's data rather than an industry average.

= Where are shopper photos stored? =
They are not stored. Photos are processed transiently by the aisthetix service and live only in the shopper's own browser storage. They never reach your WordPress server.

= Does it work with variable products? =
Yes. When a shopper selects a variation, the garment image used for the try-on switches to that variation's image automatically.

= Will my caching / optimization plugin break it? =
The loader is deliberately tiny and is registered as an exclusion for WP Rocket, LiteSpeed Cache, and Perfmatters so it is not delayed or stripped. If you use a different optimizer, exclude `assets/bootstrap.js` from JS delay/defer.

= What happens when the monthly quota runs out? =
The try-on entry point simply disappears from the storefront until the quota resets. There is no broken button and no upsell shown to shoppers. Quota and billing are managed on the aisthetix dashboard.

== Screenshots ==

1. The try-on button on a product page.
2. The upload-your-photo step.
3. A generated try-on result.
4. The wp-admin connection and status screen.
5. A generated men's try-on result.

== Changelog ==

= 0.5.0 =
* New: a Plan & usage panel on the settings screen. See your plan status at a glance and jump straight to picking a plan or opening your dashboard.
* Refreshed the plugin name, icon, and listing banner.

= 0.4.0 =
* Anonymous analytics are now strictly opt-in. No visitor cookie and no analytics or order events are sent unless you enable "Anonymous analytics" (off by default) or your consent banner grants analytics consent. The shopper-initiated try-on is unaffected.
* Added a full external-services, cookie, and consent disclosure.
* Points at the current aisthetix service endpoint by default.
* Housekeeping: refreshed "Tested up to" and the plugin/author links, and included the widget's source for build transparency.

= 0.3.0 =
* Shopper photos and garment images are now compressed in the browser before upload. Large photos "just work" instead of being rejected, and uploads are faster.
* The photo picker now accepts any image the browser can read (including HEIC); only genuinely unreadable files are declined, with a clear message.

= 0.2.0 =
* Try-on now routes to an AI provider based on the product's category (e.g. swimwear), improving result quality per garment type.
* Added a consent step before generating an AI try-on of the shopper's photo.

= 0.1.0 =
* Initial foundation: Connect flow, storefront bootstrap + widget, cached status, placements (auto-hook, shortcode, Gutenberg block, Elementor widget), and optimizer exclusions.

== Upgrade Notice ==

= 0.5.0 =
Adds a Plan & usage panel to the settings screen so you can see your plan and manage it from WooCommerce.

= 0.4.0 =
Analytics is now opt-in (off by default). Enable "Anonymous analytics" under WooCommerce -> aisthetix Try-On if you want try-on attribution.

= 0.1.0 =
First release.
