=== MeasureFlow — Measurement Price Calculator for WooCommerce ===
Contributors: berylapps
Tags: woocommerce, price calculator, measurement, area calculator, flooring
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Accurate measurement, area, weight, and box-coverage price calculator for WooCommerce with native HPOS, Checkout Blocks, and Elementor support.

== Description ==

**MeasureFlow** lets WooCommerce stores sell products priced by **length, area (length × width or single area), weight, or box/roll coverage** with exact arbitrary-precision decimal arithmetic and authoritative server-side price recalculation.

Built from the ground up for modern WordPress, WooCommerce HPOS, Cart & Checkout Blocks, and Elementor:

* **Server-Side Single Source of Truth**: Recalculates every cart item authoritatively across Classic Cart, Classic Checkout, and WooCommerce Cart & Checkout Blocks (Store API). Frontend inputs never dictate cart prices — zero hidden price fields.
* **European Comma Decimals & Imperial Fractions**: Native support for `3,5`, `1.234,56`, `1 234,56`, and `12 1/2` inches using `inputmode="decimal"` without browser input rejection.
* **Box & Roll Coverage Calculator**: Ideal for flooring, ceramic tile, wallpaper, fabric, mulch, timber, and fencing. Shoppers enter room length and width and MeasureFlow calculates exact boxes or rolls needed with anti-drift ceiling logic.
* **Native HPOS & Cart/Checkout Blocks**: Declares full compatibility with WooCommerce High-Performance Order Storage (`custom_order_tables`) and Cart/Checkout Blocks (`cart_checkout_blocks`), exposing clean measurement metadata through Store API `ExtendSchema`.
* **Native Elementor Widget & Gutenberg Block**: Drop the calculator cleanly into any Elementor Single Product Template or Block Theme without breaking product layouts, or use the `[measureflow_calculator]` shortcode.
* **3 Modern Built-In Skins**: Minimal Card, Architect Grid, and Soft Pill — zero jQuery, lightweight vanilla JavaScript.
* **Metric & Imperial Units with Min/Max/Step Rules**: Supports `m`, `cm`, `mm`, `ft`, `in`, `yd`, `sq m`, `sq ft`, `kg`, `g`, `lb`, `oz`, and configurable validation limits.

= Optional Pro Add-On =

Everything listed above is permanently free and standalone under GPLv2+. For high-volume stores and agencies, an optional commercial add-on ([MeasureFlow Pro](https://measureflow.berylapps.com)) adds cutting overage/waste percentages, a frontend Metric/Imperial unit switcher, tiered volume pricing tables with variation overrides, per-unit decimal inventory, dynamic shipping weight, area-linked add-on accessories, CSV/category bulk setup, and a non-destructive 1-Click SkyVerge `_wc_price_calculator` migrator.

== Installation ==

1. Upload the `measureflow-for-woocommerce` folder to `/wp-content/plugins/`, or install it directly through the WordPress Plugins screen.
2. Activate the plugin (requires WooCommerce 8.5+ and PHP 8.1+).
3. Edit any WooCommerce product, open the **MeasureFlow** tab in Product Data, enable the calculator, choose your mode (Length, Area L×W, Area, Weight, or Box/Roll Coverage), set units and skin, and save.
4. For Elementor or Block Themes, place the **MeasureFlow Calculator** widget/block inside your Single Product Template.

== Frequently Asked Questions ==

= Does MeasureFlow work with WooCommerce HPOS and Cart/Checkout Blocks? =

Yes. MeasureFlow declares full compatibility with High-Performance Order Storage (`custom_order_tables`) and Cart/Checkout Blocks (`cart_checkout_blocks`), and exposes structured cart item metadata through the WooCommerce Store API.

= Does MeasureFlow support European comma decimal inputs like 3,5? =

Yes. MeasureFlow uses text inputs with `inputmode="decimal"` and a locale-aware server parser that supports European commas (`3,5`), European thousand separators (`1.234,56` and `1 234,56`), and imperial mixed fractions (`12 1/2`).

= Can shoppers tamper with the price in browser DevTools? =

No. MeasureFlow never submits or trusts any frontend price field. All cart, checkout, and Store API totals are recalculated strictly on the server from product settings and validated dimension inputs.

= Is the free version fully functional without a license key? =

Yes. Length, area (L×W and single area), weight, box/roll coverage, European decimal parsing, HPOS, Checkout Blocks, Gutenberg Block, Elementor Widget, and all 3 skins work permanently without registration, time locks, or license keys.

== Screenshots ==

1. Frontend area calculator accepting European comma decimals (3,5 × 2,4 m) with live server-verified pricing.
2. WooCommerce Cart & Checkout Blocks (Store API) showing measurement breakdown and coupon compatibility.
3. Native Elementor Single Product widget rendering cleanly inside product templates.
4. Native Gutenberg Block rendering box & roll coverage calculations.
5. Clean WooCommerce Product Data — MeasureFlow configuration tab.
6. Optional MeasureFlow Pro add-on preview: cutting overage %, Metric/Imperial unit switcher, tiered volume pricing, and area-linked accessories.

== Changelog ==

= 1.1.0 =
* Added Box / Roll Price Basis selector (price per box vs. price per pricing unit auto-multiplied by box coverage) with dual unit + box catalog price suffix.
* Added WP-Admin UI controls for per-field Min / Max / Step validation rules and custom dimension labels.
* Added multi-room calculation engine support (`calculateMulti`) and Docs / Pro links in WP-Admin.

= 1.0.0 =
* Initial public release with arbitrary-precision decimal math engine, metric/imperial unit conversion, length/area/weight/box-coverage modes, European comma & imperial fraction parsing, authoritative server-side recalculation, HPOS & Store API Cart/Checkout Blocks support, Gutenberg Block, Elementor Widget, and 3 modern skins.

== Upgrade Notice ==

= 1.1.0 =
Adds Box / Roll per-unit pricing basis with dual catalog display, per-field Min/Max/Step admin controls, and multi-room calculation engine support.

= 1.0.0 =
Initial stable release of MeasureFlow — Measurement Price Calculator for WooCommerce.
