=== Frebix Measurements ===
Contributors: frebix
Tags: woocommerce, measurements, tailoring, made to measure, clothing
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Customers enter their body measurements on made-to-measure products. They are saved with each cart line and shown on the order, in emails and in admin.

== Description ==

Frebix Measurements is for tailors and fashion stores that make clothes to measure.

On the product page, an "Add measurements" button opens a side panel with the fields you set up (bust, waist, hips, or anything else). The values are attached to that cart line, so the order, the order emails and the admin order screen show exactly what the customer entered for each item.

* Your own fields: name, group, placeholder, help text, required, and a lowest and highest value.
* Show the button on every product, on chosen categories, or product by product.
* "Measurements required to buy" per product, and required fields that are checked before the item goes in the cart.
* Centimetres or inches, with an optional cm / in switch for customers. Values are saved in the unit the customer chose and always shown with it.
* Signed-in customers can keep several named sets of measurements (for example "Me" and "My son"), choose one in the panel, and see or delete them under My account > My measurements.
* Measurements under each order line on the thank-you page, in HTML and plain-text emails, and in the admin order screen, plus a box with a Print button.
* A Customers screen with search, pages and a CSV export.
* Works with the Cart and Checkout blocks and with High-Performance Order Storage.

== Installation ==

1. Upload the plugin and activate it. WooCommerce must be active.
2. Go to Frebix > Measurements to choose the unit and where the button shows.
3. Open the Fields tab to set up the measurements you need.

== Frequently Asked Questions ==

= Why does adding the same product twice give two cart lines? =

On purpose. Each time a customer adds an item with measurements, it gets its own cart line, so two dresses for two different people are never merged into one line with one set of measurements. Products without measurements stack as usual.

= Can I rename a field? =

Yes. Each field has a fixed id, and values are saved under that id, so renaming a field keeps every value customers already saved and older orders keep their values.

= Where do customers manage their saved measurements? =

Under My account > My measurements (when customer profiles are switched on). If your theme already has its own "My measurements" page, the plugin leaves that page to the theme.

== Privacy ==

Body measurements are personal data. This plugin:

* stores measurements on order lines, in the visitor's shopping session until checkout, and, for signed-in customers who choose "Save to my account", on their account;
* adds them to WordPress's personal data export (Tools > Export Personal Data);
* removes the ones saved on the account with Tools > Erase Personal Data. Measurements on orders are removed too when WooCommerce is set to remove personal data from orders on request (WooCommerce > Settings > Accounts & Privacy); otherwise they are kept with the order;
* suggests text for your privacy policy (Settings > Privacy > Policy guide).

Deleting the plugin keeps all data, unless you switch on "Delete settings and saved customer measurements when the plugin is deleted" under Settings > Advanced. Measurements on orders are always kept.

The plugin sends no data to other sites.

== Changelog ==



= 2.1.2 =
* New Frebix logo in the footer, signature and WordPress menu icon.

= 2.1.1 =
* The Frebix page in your dashboard is now a home for your plugins: what needs you, which plugins have updates, and each plugin's state.

= 2.1.0 =
* Customer unit switch (cm / in) in the panel; values are saved and shown in the unit the customer chose.
* Saved measurement sets for signed-in customers: pick one in the panel, manage them under My account > My measurements.
* Values are checked on the server: known fields only, numbers, lowest and highest value, required fields.
* Panel width setting now applies. Panel is a proper dialog: focus moves in and back, stays inside while open, Escape closes, labels are translated.
* Fields keep a fixed id, so renaming a field keeps saved values and profiles (existing data needs no change).
* Default texts (field names, help text, button labels) show in the visitor's language.
* Personal data export and erase, suggested privacy policy text, and an optional clean-up when the plugin is deleted.
* Customers screen: pages, search and CSV export.
* Button colours and sizes are checked before use; admin styles load on order screens only; Print button no longer writes a new window.
* Removed old backup files and unused code.

= 2.0.0 =
* Current release.
