=== Entersize – Size charts and recommendations for WooCommerce ===
Contributors: entersize
Tags: size finder, size chart, size guide, size recommendation, woocommerce
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

Size recommendations and size charts for WooCommerce. Shoppers answer a few questions and get the size that fits. Fewer returns.

== Description ==

Entersize helps shoppers pick the right size before they buy, so you get fewer size-related returns.

The plugin adds a Find your size button to your product pages. Shoppers answer a few questions, such as height, weight, age and fit preference, and Entersize recommends a size based on that product's size chart. The full size chart is in the same popup.

= Features =

* **Size Finder.** Size recommendations from a few shopper answers, matched against your chart's measurements.
* **Size charts.** Tables or illustrated measurement guides, with automatic cm/inch conversion.
* **Fast setup.** Start from a template, import a CSV, or add a brand's chart from the Entersize library.
* **Product rules.** Assign charts by brand, category or tag, or pick products one by one.
* **Placement.** Next to the add-to-cart button automatically, or anywhere with a shortcode.
* **Your look.** Colors, labels and button style, set in the Entersize app.
* **Languages.** English, German, Spanish and Polish.

= How it works =

1. Connect your store from the Entersize menu in WordPress.
2. Create size charts in the Entersize app and assign them to products.
3. The button appears on matching product pages.

You need an Entersize account. The Hobby plan is free. See [pricing](https://entersize.com/pricing).

= Shortcode =

`[entersize_size_finder]` places the Find your size button. On a product page it uses the current product. Elsewhere, pass `product_id="123"`. Using the shortcode turns off automatic placement for that page, so the button never shows twice.

= For developers =

* `entersize_client_ip` filter: return the real visitor IP when the store is behind a trusted proxy such as Cloudflare. By default only `REMOTE_ADDR` is used.
* `entersize_has_shortcode` filter: tell the plugin a page contains its shortcode when the shortcode lives outside post content, for example in a page builder template.

= Support =

Setup guide: [entersize.com/docs/woocommerce](https://entersize.com/docs/woocommerce). Questions: [entersize.com/contact](https://entersize.com/contact).

== Installation ==

1. Install and activate WooCommerce.
2. Go to Plugins > Add New, search for "Entersize", then install and activate it.
3. Open Entersize in the admin menu and click "Connect your store".
4. Sign in to Entersize (or create an account) and approve WooCommerce access. You are sent back to WordPress, connected.
5. Create your size charts in the Entersize app.

== Frequently Asked Questions ==

= Do I need an Entersize account? =

Yes. Charts, product rules and recommendations live in Entersize. The Hobby plan is free.

= The button doesn't show on a product. =

It only shows when a size chart is assigned to that product. Check the chart's product rules in the Entersize app.

= How do I disconnect my store? =

Click "Disconnect your account" on the plugin page. It opens the Entersize app, where you disconnect. The plugin clears its token the next time you open its page.

= What shopper data is sent to Entersize? =

Only what is needed to show a chart or recommend a size. Entersize never receives shopper names, emails or orders. The full list is under External services.

== External services ==

This plugin needs the Entersize service (https://entersize.com), operated by Entersize, to work.

Terms of Service: https://entersize.com/terms
Privacy Policy: https://entersize.com/privacy

The plugin sends data to Entersize when:

* **Connecting your store.** When an admin clicks "Connect your store", the browser goes to entersize.com with your store URL, the plugin page URL and a one-time connection code. Entersize confirms the code by calling your store's `/wp-json/entersize/v1/connection/verify` endpoint. The plugin then exchanges the code and your store URL server-to-server (`/api/embed/woo/plugin/exchange`) for a store token.
* **Loading settings.** When the plugin page is opened, and at most once a minute on product pages, the plugin calls `/api/embed/woo/status` with the store token to load appearance, labels and plan status.
* **Showing a size chart.** When a product page with the button loads, the plugin calls `/api/embed/woo/resolve` with the product ID, name, SKU, categories, brands and tags. Results are cached on your store for one minute.
* **Using the Size Finder.** When a shopper asks for a recommendation, the plugin calls `/api/embed/woo/fit-predictor/predict` with the product details above and the shopper's answers (for example height, weight, age, gender, fit preference, body shape and bra size). When a shopper rates a recommendation, it calls `/api/embed/woo/fit-predictor/feedback` with the recommendation ID and the rating. It may call `/api/embed/woo/fit-predictor/sizes` with a chart ID to list sizes.
* **Shopper IP address.** Size Finder requests include the shopper's IP address so Entersize can rate-limit abuse per visitor.

Nothing is sent before an admin clicks "Connect your store".

Loaded in the shopper's browser:

* **Popup scripts and styles.** On product pages, and pages with the shortcode, the Size Chart and Size Finder scripts and styles load from entersize.com (`/embed/`). Entersize receives the shopper's IP address and browser details with these requests.
* **Chart illustrations** load as images from entersize.com when a chart uses illustrated measurement guides.
* **Google Fonts** (https://fonts.google.com) serves the Instrument Sans font for the popup. Google receives the shopper's IP address and browser details. Privacy policy: https://policies.google.com/privacy
* **Entersize credit.** Depending on your plan, the popups may show a small "Entersize" logo linking to entersize.com. The link includes your store's domain as a referral parameter.

== Changelog ==

= 1.0.0 =
* First public release.
