*** Simple Role Based Pricing Changelog ***

2026-05-05 - version 2.2.0
* Removal of the mbstring dependency — it was limiting and causing friction during activation

2026-05-04 - version 2.1.1
* **Internationalization Complete**: All text strings are now properly prepared for translations (i18n). Ready for multiple languages.

2026-05-03 - version 2.1.1
* **Database Optimization**: Fully deprecated the legacy SQL schema.
* **Data Migration**: Successfully moved all standalone columns ('discount_type', 'discount_value', 'categories') into a unified 'rules' JSON blob.
* **Logic Fix**: Corrected category name retrieval in the Overview table (no more "ID: 1" fallback).
* **Currency Support**: Switched to native WooCommerce currency symbols for global compatibility.

2026-05-02 - version 2.1.0
* **Major Architecture Overhaul**: Migrated data storage to a centralized JSON format for superior flexibility and future-proofing.
* **Smart Time-Based Rules**: Introduced a scheduling system to define specific start and end dates for role-based discounts.
* **Per-Category Granularity**: Enabled unique discount types and values for each category individually, independent of global role settings.
* **Advanced Admin Interface**: Implemented a dynamic category selector with real-time JSON rule generation and improved UI feedback.
* **Optimized Pricing Engine**: Refactored the calculation logic into a dedicated class for better performance and easier debugging.
* **Enhanced Data Integrity**: The system now dynamically filters active rules based on date validity at the point of calculation.

2026-04-30 - version 2.0.3
* Improvement: Added a clear notice in the settings to explain how individual user price overrides work.

2026-04-30 - version 2.0.2
* UI: Added expandable category previews in the Role Overview table for better configuration tracking.

2026-04-30 - version 2.0.1
* Fix: Resolved role selector UI freeze caused by WooCommerce Select2 overlay. Bug present since 1.2.0 i'm truely sorry for didn't paying attention.
* Fix: Implemented jQuery-based event listeners to properly detect role changes when Select2 is active.
* Debug: Restored admin console logging to improve real-time troubleshooting of DOM interactions.

2026-04-30 - version 2.0.0
* Major: Complete pricing engine refactor. Fully migrated from the "Legacy Coupon" system to a "Native Filter" architecture (improved performance and stability).
* New Feature: User-Specific Pricing (Granularity). You can now set custom discounts for individual users that override global role-based rules.
* Stability: Implemented an anti-loop static flag ($is_calculating) to prevent server crashes during recursive price calls.
* Compatibility: Added REST API and Admin-side detection to ensure prices remain original during data exports or back-office management.
* Logic: Improved conflict management. The plugin now automatically yields if a product is already on native sale or if an "Individual use" coupon is applied to the cart.
* Tweak: Tested and confirmed compatibility with WooCommerce 10.7 and WordPress 6.7.
* Cleanup: Conditionnal Class Loading and Removed redundant debug logs and optimized class loading for a lighter footprint.

2026-04-03 - version 1.2.2
* Fix: Add missing 'enable' column and move DB setup to activation.

2026-04-03 - version 1.2.1
* Fix: Some console logs were badly commented.

2026-04-02 - version 1.2.0
* Performance: Cleaned up all debug logs and console.log for production use.
* Fix: Added explicit WooCommerce activation check.
* Fix: Declared full High-Performance Order Storage (HPOS) compatibility.
* Fix: UI Overhaul - Removed custom background styles to match WooCommerce Native UI.

2026-03-13 - version 1.1.9
* Made Specific Categories fully free and usable without Pro restrictions.

2026-03-10 - version 1.1.8
* Improvement: Switched to modern WooCommerce pricing flow using native get_price filters for item prices, subtotals, and totals (no artificial coupon needed on WC >= 3.2).
* Fix: Correct category handling for variable products (now uses $product->get_category_ids() instead of wp_get_post_terms on variation ID).
* Added: Automatic cart recalculation on user login to apply role-based prices if user logs in after adding items to cart.
* Added: Explicit set_price() calls on woocommerce_before_calculate_totals hook for maximum reliability.
* Changed: Coupon 'simproba_role_discount' is no longer created or applied on WooCommerce >= 3.2 → cleaner checkout display (no mystery discount line).
* Tweak: Refactored pricing logic into a reusable method to reduce duplication and improve maintainability.
* Note: Fully backward compatible – coupon logic remains active only for very old WooCommerce versions (< 3.2).

2025-11-01 - version 1.1.7
* Changed: Long time deprecated ${var} by {$var} , stopping all related php 8+ warnings by the way

2025-08-31 - version 1.1.6
* Added / Fixed: Discount wasn't applied at checkout. At all. So coupon method was applied for clearness.

2025-08-29 - version 1.1.4
* Added: Pro version indicator for "Specific Categories" option in the Apply To selector with a modern inline notification.

2025-08-26 - version 1.1.3
* Fixed: Css overstep beyond role-pricing tab + overthrow main woocommerce aspect with first rule

2025-08-23 - version 1.1.2
* Fixed: Table name interpolation is to be ignored.

2025-08-23 - version 1.1.1
* Fixed: Added missing translators comments in product-fields.php for internationalization.
* Fixed: Corrected SQL queries in multiple files to properly use $wpdb->prepare() without backticks.
* Fixed: Enhanced sanitization for $_POST categories input in admin-settings.php.
* Fixed: Replaced all %s strings that define tables names in prepared request
by identifier %i.

2025-08-22 - version 1.1.0
* Fixed: Addressed security issues from QIT tests (data sanitization, SQL queries, nonces).
* Fixed: Corrected WordPress.org Plugin Check violations (internationalization, WP_Filesystem).
* Fixed: Corrected SQL syntax errors in database queries.
* Fixed: Improved log file permission handling.

2025-08-21 - version 1.0.9
* Added: changelog.txt file for WooCommerce Marketplace submission.
* Tweak: Ensured compliance with WooCommerce submission requirements.

2025-07-01 - version 1.0.8
* Added: Changelog section to readme.txt for WooCommerce Marketplace submission.
* Tweak: Updated documentation for clarity.

2025-07-01 - version 1.0.7
* Fixed: Improved compatibility with WooCommerce 9.0.
* Added: Support for variable product pricing per user role.
* Tweak: Optimized debug logging for better performance.

2025-06-13 - version 1.0.6
* Added: Category restriction option for role-based pricing.
* Fixed: Bug in Quick Edit pricing for specific user roles.

2025-05-25 - version 1.0.5
* Added: Crash Handling.
* Fixed: This plugin won't crash anymore if the required packages are not installed but simply warn the user.

2025-05-25 - version 1.0.4
* Added: Dynamic Translation.

2025-05-24 - version 1.0.3
* Added: Translation.

2025-05-24 - version 1.0.2
* Fixed: Better Category Handling.

2025-05-21 - version 1.0.1
* Added: New Style.

2024-05-21 - version 1.0.0
* Added: First version.
