== Changelog ==

= 1.0.0 =
* Initial release of StockAdaptix Pricing for WooCommerce
* Added dynamic pricing based on stock levels:
  - If stock ≤ 5 → increase price by 40%
  - If stock ≤ 20 → increase price by 20%
  - If stock ≥ 100 → decrease price by 15%
  - Otherwise → use normal price
* Added admin settings page under WooCommerce menu
* Implemented configurable thresholds and percentage adjustments
* Added optional customer messaging about price adjustments
* Added support for product page, cart, and checkout pricing
* Added compatibility with simple products and WooCommerce stock management
* Made translation-ready with POT file included
* Implemented proper WordPress and WooCommerce coding standards

= 1.0.1 =
- Fixed bug

= 1.1.0 =
* New: support for variable products (per-variation stock-based pricing)
* New: unlimited pricing rule tiers (replaces fixed low/medium/high; legacy settings auto-migrated)
* New: configurable price floor and ceiling caps
* New: rounding modes — charm pricing (.99) and nearest integer
* New: React-based admin settings page (@wordpress/components)
* New: REST API endpoints for settings and live price preview
* New: in-admin preview simulator — try (base price, stock) and see the engine output
* New: PHPUnit unit tests for the pricing math

= 2.0.0 =
* Major release rolling up the full new pricing engine, admin UI, and REST API
* Pricing engine: unlimited multi-rule tiers with `lte`/`gte` comparators, first-match-wins evaluation, increase/decrease percentage adjustments
* Variable products: per-variation pricing with parent-stock fallback when a variation inherits stock; variation min/max price cache busts on settings change
* Price floor and ceiling clamps; charm-pricing (.99) and nearest-integer rounding modes
* Brand-new React admin UI built on @wordpress/components, with a built-in live price preview simulator
* REST API: GET/POST `/wp-json/stockadaptix/v1/settings`, POST `/wp-json/stockadaptix/v1/preview`
* Customer messaging on product pages and cart line items (toggleable, customizable copy)
* Cart safety: each adjusted cart item gets a unique key so two adds of the same product at different prices stay on separate lines; original and adjusted prices propagate to order item meta
* Order safety: price filters are skipped during order create/update and stripped from email contexts so historical totals and email receipts always reflect what was actually charged
* HPOS (High-Performance Order Storage) compatible
* Pure pricing math extracted to `compute_price()` and covered by PHPUnit tests
* Legacy 1.0.x settings (low/medium/high three-tier schema) auto-migrated to the new rules array on read