=== GO Eyewear Try-On ===
Contributors: glasson
Tags: woocommerce, eyewear, virtual try-on, augmented reality, glasses
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let shoppers try eyewear on with their camera. Adds virtual try-on, 360° view and PD measurement to WooCommerce products.

== Description ==

GO turns your frame photos into 3D models so shoppers can see how a pair looks on their own face before buying. This plugin connects your WooCommerce store to the GO service and places the try-on buttons on your product and category pages.

**What it does**

* Adds a **Try-on** button that opens a live camera view with the frame on the shopper's face
* Optional **360° view** for spinning the frame
* Optional **PD measurement** (pupillary distance), on the Growth and Enterprise plans
* Works on single product pages and on category / shop listings
* Per-variation support: a variable product can offer try-on on some colours and not others
* Manual placement with the `[go_try_on]` shortcode or the GO Try-On block, for page builders

**How it works**

1. Install and activate, then connect your store from the GO menu.
2. Upload frame photos for a product from the GO dashboard, which opens on glasson.io in a new tab. GO builds the 3D model — this is a human-assisted process and takes hours to days.
3. Switch try-on on for that product. The button appears on your storefront.

**Plans**

* **Starter** — free, up to 10 frame models
* **Growth** — $49/month, up to 50 models, includes PD measurement
* **Enterprise** — $199/month, up to 300 models, includes PD measurement

All plans add $1 for each 3D model adjustment made by a human designer. Billing happens on glasson.io, not inside WordPress.

== External services ==

This plugin requires the GO service to function. It is not usable standalone: the 3D models, the try-on rendering and the account itself all live on GO's servers.

**GO API — `glasson.sk-global.biz`**

* **When:** after you click "Connect store"; then whenever the plugin opens the GO dashboard, and whenever GO syncs your catalog.
* **What is sent on connecting:** your site URL, site name, administrator email address and site locale.
* **What is sent afterwards:** a short-lived code used to open the dashboard. GO also calls back into your site to read product titles, SKUs and image URLs, and to store which products have try-on switched on.
* **Nothing is sent before you click "Connect store."**

**GO dashboard — `glasson.io`**

* **When:** only when you click "Open GO dashboard". The dashboard opens on glasson.io in a new tab; nothing is loaded from it while you are in WordPress.
* **What is sent:** the single-use code described above.

**Try-on widget — `media.glasses4u.io`**

* **When:** on the storefront, only after a shopper clicks a try-on button on a product that has try-on switched on.
* **What is sent:** the frame's public model id. The camera image is processed in the shopper's browser and is not uploaded.

Terms of service: https://glasson.io/terms.html
Privacy policy: https://glasson.io/privacy.html

== Installation ==

1. Install the plugin through **Plugins → Add New**, or upload the folder to `/wp-content/plugins/`.
2. Activate it. WooCommerce must be active.
3. Go to **GO** in the admin menu and click **Connect store**.
4. Adjust placement and labels under **GO → Buttons**.

== Frequently Asked Questions ==

= Does this work without WooCommerce? =

No. Products, variations and the storefront hooks all come from WooCommerce.

= The button does not appear on my product page. =

Two things to check. First, try-on has to be switched on for that specific product in the GO dashboard, and its 3D model has to be finished. Second, some themes — particularly block themes and page builders such as Elementor or Divi — do not fire the standard WooCommerce hooks. Leave **GO → Buttons → Gallery fallback** switched on; it places the button next to your product gallery instead. If that still misses, paste a CSS selector for your gallery container into the custom selector field, or place the button yourself with `[go_try_on]`.

= Does the shopper's camera image leave their device? =

No. Face detection and rendering happen in the browser. Only the 3D frame model is downloaded.

= Can I use it on a staging site? =

The 3D modelling pipeline downloads your product images, so they have to be reachable without a password. A site behind HTTP authentication or a "coming soon" plugin will fail to produce models. The GO screen warns you when it detects this.

= What happens to my data if I uninstall? =

Plugin settings are deleted. The link between your products and their 3D models is kept, so reinstalling does not require re-submitting every frame.

== Screenshots ==

1. Real-time virtual try-on, 360° view and PD measurement on a product page
2. The try-on list: request a 3D model from two product photos, follow quality checking, and switch try-on on or off per product
3. Usage reports for try-on, 360° view and PD measurement, by day, month or year

== Changelog ==

= 0.1.0 =
* First release.

== Upgrade Notice ==

= 0.1.0 =
First release.
