== Changelog ==

= 2.7.0 (19-04-2026) =
* NEW: Unified filter `wc_iikocloud_checkout_field_titles` in wc-iikocloud-modules for checkout block titles (keys: modifiers, delivery_zones, time, tables, change, guests).
* REMOVED: Separate title filters `wc_iikocloud_modifiers_title`, `wc_iikocloud_delivery_zones_title`, `wc_iikocloud_time_title`, `wc_iikocloud_tables_title`, `wc_iikocloud_change_title`, `wc_iikocloud_guests_title` (use the unified filter; update custom `add_filter` callbacks accordingly).
* IMPROVED: WordPress Coding Standards (PHPCS / WPCS) compliance across PHP code; both this plugin and wc-iikocloud-modules pass full `composer run lint` on the current ruleset.
* IMPROVED: Security-hardening aligned with WPCS where applicable (output escaping, nonce checks on AJAX flows, narrower suppressions instead of file-wide disables).
* IMPROVED: Documentation and inline comments (docblocks), naming consistency, and safer patterns (e.g. avoiding `extract()`, stricter comparisons and input checks where appropriate).
* IMPROVED: PHPStan static analysis integration achieved Level 0 with completely empty baselines for both the main plugin and modules.
* IMPROVED: Hooks documentation (`documentation/other/hooks.md`) updated for the unified checkout field titles filter.

= 2.6.2 (15-04-2026) =
* REMOVED: Molnia proxy integration; all API traffic uses direct iikoCloud/Syrve HTTP.
* NEW: Http_Client for JSON POST requests; Iiko_Access_Token for bearer token with transient cache.
* IMPROVED: On upgrade to this version, legacy Molnia options and the Molnia JWT transient are removed (Plugin_Upgrade).
* IMPROVED: Extended `Settings_Cache` to `chosen_city_ids`, `chosen_groups`, `chosen_terminals`, and `table_ids` (invalidate on `update_option_*` / `delete_option_*` where applicable).

= 2.6.1 (10-04-2026) =
* NEW: Added filter 'wc_iikocloud_order_status_notifications' for export customer payload (maps to iikoCloud `shouldReceiveOrderStatusNotifications`; params: $value, $order). Default: true. Return null to omit the field from the API request.
* IMPROVED: Removed deprecated `shouldReceivePromoActionsInfo` from export customer data (superseded by order status notifications in iikoCloud API).

= 2.6.0 (18-03-2026) =
* NEW: Added filter 'wc_iikocloud_address_format_type' for address format override (params: $format, $order_id, $organization_id).
* NEW: Added filter 'wc_iikocloud_delivery_address_line1' for line1 customization (params: $line1, $order, $order_id).
* IMPROVED: Full documentation of all plugin hooks (filters and actions) added to documentation.
* IMPROVED: Changelog entries for previously undocumented hooks:
  - Filters: wc_iikocloud_order_complete_before, wc_iikocloud_order_phone, wc_iikocloud_order_delivery_point, wc_iikocloud_order_comment, wc_iikocloud_order_guests, wc_iikocloud_order_discounts, wc_iikocloud_order_payments, wc_iikocloud_delivery_point_comment, wc_iikocloud_export_delivery_modifiers, wc_iikocloud_order_export_terminal_id, wc_iikocloud_order_table_ids, wc_iikocloud_order_cheque_additional_info, wc_iikocloud_plugin_subheader, wc_iikocloud_kbzhu.
  - Actions: wc_iikocloud_loaded, wc_iikocloud_add_plugin_page_fieldsets, wc_iikocloud_created_delivery.
  - Modules filters: wc_iikocloud_modifiers_title, wc_iikocloud_delivery_zones_title, wc_iikocloud_delivery_zones_full_address, wc_iikocloud_city_suggest_prefix, wc_iikocloud_time_title, wc_iikocloud_tables_title, wc_iikocloud_change_title, wc_iikocloud_guests_title, wc_iikocloud_checkout_settings.

= 2.5.9 (03-03-2026) =
* NEW: Import of product tags (labels) for external menu products.
* NEW: Added filter 'wc_iikocloud_order_service_type' for orders Export.
* NEW: Support for products in multiple categories.
* IMPROVED: Safer product tags handling for iikoOffice import (default array, sanitize, filter).
* IMPROVED: Refactored ChecksTrait for better parameter validation (validate_param, validate_array).
* IMPROVED: AJAX requests error handling and validation logic.
* IMPROVED: Added verify_ajax_request() wrapper for nonce and POST params validation.
* IMPROVED: Replaced empty wp_send_json_error() with Logs::add_error() and Logs::get_logs() for better UX.
* IMPROVED: Reuse single Api_Client instance in Common_API_Requests instead of creating new one per request.
* IMPROVED: Options caching for import, export, checkout, cron, delivery_zones, all_cities.
* IMPROVED: Enhanced compatibility with WordPress 6.9
* IMPROVED: Enhanced compatibility with WooCommerce 10.6
* IMPROVED: Unified external menu product import logic.
* FIXED: Remove redundant vendor folder.
* FIXED: External menu import now uses itemId (not id) for product indexing.

= 2.5.8 (14-08-2025) =
* FIXED: Rename plugin.
* IMPROVED: Optimize and reformat admin JS code.

= 2.5.7 (05-06-2025) =
* NEW: Order status and progress bar display on the thank you page.
* NEW: Order status now updates automatically on the thank you page without page reload.
* NEW: Added Tbank and HB epay online payment methods support
  - Only if 'Automatic transfer of the order to the status "Completed" after successful payment' option is enabled. For Tbank only
  - HB epay changes successful payments to "Completed" status by default
* NEW: Added 'Show iiko order number and status (on order received page)' option
  - Displays order tracking information to customers
  - Improves order status visibility
* NEW: Added filter 'wc_iikocloud_delivery_switch_types' for Checkout module
  - Allows customization of delivery type switching behavior
  - Provides more flexibility in delivery management
* IMPROVED: Removed 'Enable reviews' import option
  - Streamlines product import process
  - Reduces unnecessary configuration options
* IMPROVED: Enhanced compatibility with WordPress 6.8
* IMPROVED: Enhanced compatibility with WooCommerce 9.9
* IMPROVED: Clear chosen delivery zone data when address is not in a delivery zone
  - Prevents data inconsistencies
  - Improves user experience
* IMPROVED: Moved Delivery Switch to Delivery Zones module
  - Better organization of related features
  - Improved code structure
* IMPROVED: Enhanced plugin documentation
  - Better user guidance
  - Clearer feature descriptions
* FIXED: Export functionality for online payments
  - Ensures proper order processing
  - Improves payment handling
* FIXED: Order status checking mechanism
  - More reliable status updates
  - Better error handling
* FIXED: Maximum bonuses number calculation in Loyalty module
  - Prevents overflow issues
  - Improves bonus management

= 2.5.6 (20-02-2024) =
* IMPROVED: Enhanced compatibility with WooCommerce 9.6
* IMPROVED: Added ability to change product KBZHU
  - Better product management
  - Improved nutritional information handling
* IMPROVED: Removed Time zone option
  - Simplified configuration
  - Reduced complexity
* IMPROVED: Moved dependencies into WPWC\iikoCloud\ namespace
  - Better code organization
  - Improved maintainability
* FIXED: Resolved Plugin Check errors and warnings
  - Better compatibility
  - Improved code quality
* FIXED: Fixed group ID and product category ID saving
  - Ensures proper product organization
  - Prevents data inconsistencies

= 2.5.5 (25-01-2024) =
* NEW: Added 'Delivery Switch' option for Checkout module
  - Allows customers to switch between delivery types
  - Improves delivery management
* NEW: Added filter 'wc_iikocloud_suggest_results' for Delivery Zones module
  - Customizes address suggestions
  - Improves user experience
* IMPROVED: Enhanced compatibility with Syrve API
  - Better integration with Syrve systems
  - Improved reliability
* IMPROVED: Enhanced compatibility with WooCommerce 9.5
* FIXED: Resolved Yandex.Map issues in Delivery Zones module
  - Better map functionality
  - Improved user experience

= 2.5.4 (18-12-2023) =
* NEW: Added option 'Use WooCommerce shipping zones instead of shipping methods'
  - Provides more flexible shipping configuration
  - Better integration with WooCommerce shipping system
* NEW: Added filters 'wc_iikocloud_map_address_messages' and 'wc_iikocloud_map_shipping_messages'
  - Allows customization of map-related messages
  - Improves user interface localization
* NEW: Implemented address verification when suggest is chosen
  - Improves address accuracy
  - Reduces delivery errors
* IMPROVED: Enhanced filter 'wc_iikocloud_complete_before_minutes_offset'
  - Better time management for orders
  - More flexible scheduling options
* IMPROVED: Enhanced compatibility with WordPress 6.7
* IMPROVED: Enhanced compatibility with WooCommerce 9.4

= 2.5.3 (22-11-2023) =
* NEW: Added filter 'wc_iikocloud_order_items' to change order items on export
  - Provides more control over order data
  - Enables custom order modifications
* IMPROVED: Enabled debug mode by default
  - Better error tracking
  - Easier troubleshooting
* IMPROVED: Updated PHP libraries
  - Better performance
  - Improved security
* FIXED: Resolved Composer PHP version compatibility issues
  - Ensures proper installation
  - Prevents version conflicts

= 2.5.2 (30-10-2023) =
* NEW: Added 'Check orders after they are exported' option
  - Improves order tracking
  - Better error detection
* NEW: Added filter 'wc_iikocloud_suggest_offset' for Delivery Zones module
  - Customizes address suggestion behavior
  - Improves location accuracy
* IMPROVED: Enhanced compatibility with WordPress 6.6
* IMPROVED: Enhanced compatibility with WooCommerce 9.1
* IMPROVED: Added productCategoryId for external menu import
  - Better product organization
  - Improved import accuracy
* IMPROVED: Enhanced discounts import
  - Better price management
  - Improved discount handling

= 2.5.1 (15-09-2023) =
* NEW: Added 'Delivery & Pickup Date Time for WooCommerce' integration
  - Improves delivery scheduling
  - Better time management
* FIXED: Improved WooCommerce activation checking in WordPress multisite mode
  - Better multisite support
  - Prevents activation issues

= 2.5.0 (28-08-2023) =
* NEW: Removed access token button from plugin page
  - Improves security
  - Better token management
* NEW: Added import of services from iiko
  - Expands product capabilities
  - Better service management
* NEW: Added options for Delivery Zones module
  - More configuration flexibility
  - Better delivery management
* IMPROVED: Reduced YandexMaps suggest requests
  - Better performance
  - Reduced API usage
* IMPROVED: Enhanced Modifiers module
  - Better product customization
  - Improved modifier management
* FIXED: Resolved external menus autoimport issues
  - Better menu synchronization
  - Improved import reliability

= 2.4.9 (12-07-2023) =
* NEW: Implemented method 'Get status of command'
  - Improves order tracking
  - Better status management
* NEW: Added import of group modifiers as product custom fields
  - Better product organization
  - Improved modifier management
* NEW: Added user categories shortcode 'wpwc_user_cats'
  - Better user management
  - Improved category display
* IMPROVED: Enhanced KBZHU shortcode
  - Better nutritional information display
  - Improved user experience
* IMPROVED: Reduced requests to iiko API
  - Better performance
  - Reduced server load
* IMPROVED: Enhanced compatibility with WordPress 6.5
* IMPROVED: Enhanced compatibility with WooCommerce 8.8
* IMPROVED: Updated PHP libraries
  - Better performance
  - Improved security
* FIXED: Resolved order metadata issues
  - Better data consistency
  - Improved order management

= 2.4.8 (25-06-2023) =
* NEW: Added 'Skip group modifiers' option
  - Simplifies product management
  - Reduces unnecessary data
* NEW: Added import of price category for external menu
  - Better price management
  - Improved menu organization
* NEW: Added Delivery Zones options 'Disable scroll zoom' and 'Disable drag'
  - Better map control
  - Improved user experience
* NEW: Added parameters 'hide_full_map' and 'messages_after_map' for delivery zones shortcode
  - More flexible map display
  - Better customization options
* NEW: Added filter 'wc_iikocloud_complete_before_types'
  - Better time management
  - More flexible scheduling
* NEW: Added filter 'wc_iikocloud_complete_before_minutes_offset'
  - Better time control
  - More precise scheduling
* NEW: Added Loyalty module option 'Apply bonuses on updated checkout'
  - Better bonus management
  - Improved user experience
* IMPROVED: Enhanced async import functionality
  - Better performance
  - Reduced server load
* IMPROVED: Enhanced 'Set status Out of stock' option
  - Better inventory management
  - Improved stock control
* IMPROVED: Enhanced Yoast SEO primary product category import
  - Better SEO management
  - Improved search visibility
* IMPROVED: Enhanced cities import functionality
  - Better location management
  - Improved address handling
* IMPROVED: Combined free and premium changelogs
  - Better documentation
  - Clearer version history
* IMPROVED: Enhanced export condition for online payments
  - Better payment handling
  - Improved order processing
* IMPROVED: Enhanced compatibility with WooCommerce 8.4
* IMPROVED: Enhanced additional modules
  - Better functionality
  - Improved performance
* IMPROVED: Enhanced Delivery Zones module
  - Better map functionality
  - Improved user experience
* IMPROVED: Enhanced Loyalty module
  - Better bonus management
  - Improved user experience
* FIXED: Resolved product tags import issues
  - Better product organization
  - Improved tag management
* FIXED: Resolved bonuses calculation issues
  - Better bonus accuracy
  - Improved calculations
* FIXED: Resolved bonuses shortcode issues
  - Better bonus display
  - Improved user experience
* FIXED: Resolved translation and export address issues
  - Better localization
  - Improved address handling

= 2.4.7 (18-05-2023) =
* NEW: Added asynchronous import for external menu
  - Better performance
  - Reduced server load
* NEW: Added export option 'Turn off export'
  - Better control over exports
  - Improved flexibility
* NEW: Added WooCommerce HPOS support
  - Better order management
  - Improved performance
* NEW: Added [wpwc_delivery_zones] shortcode
  - Better delivery zone display
  - Improved user experience
* NEW: Added 'variation limit' option
  - Better product management
  - Improved performance
* IMPROVED: Translated all logs
  - Better error tracking
  - Improved debugging
* IMPROVED: Enhanced ability to import different dishes with same name
  - Better product management
  - Improved import accuracy
* IMPROVED: Enhanced compatibility with WordPress 6.4
* IMPROVED: Enhanced compatibility with WooCommerce 8.3
* IMPROVED: Enhanced nomenclature import
  - Better product organization
  - Improved import accuracy
* IMPROVED: Enhanced display of max possible bonuses
  - Better bonus visibility
  - Improved user experience
* IMPROVED: Enhanced plugin shipping methods
  - Better delivery options
  - Improved shipping management
* IMPROVED: Enhanced Delivery Zones module
  - Better map functionality
  - Improved user experience
* IMPROVED: Enhanced Checkout fields
  - Better form customization
  - Improved user experience
* IMPROVED: Enhanced ionCube Loader checking
  - Better compatibility
  - Improved security

= 2.4.6 (05-04-2023) =
* NEW: Added external menus import functionality
  - Better menu management
  - Improved import capabilities
* NEW: Added bonuses shortcode 'wpwc_bonuses'
  - Better bonus display
  - Improved user experience
* IMPROVED: Enhanced Loyalty programs
  - Added support for percent discount programs
  - Better discount management
* FIXED: Resolved Delivery Zones module issues
  - Fixed shipping methods names
  - Improved zone descriptions

= 2.4.5 (20-03-2023) =
* NEW: Added Delivery Zones module
  - Better delivery management
  - Improved location handling
* NEW: Added Discounts module
  - Enhanced Loyalty module functionality
  - Better discount management
* IMPROVED: Enhanced product ID management
  - Better product identification
  - Improved data consistency
* IMPROVED: Enhanced product category ID management
  - Better category organization
  - Improved data consistency
* IMPROVED: Made product tags import optional
  - More flexible import options
  - Better control over data
* IMPROVED: Enhanced compatibility with WordPress 6.3
* IMPROVED: Enhanced compatibility with WooCommerce 8.0

= 2.4.4 (15-02-2023) =
* NEW: Added Telegram notifications for orders export errors
  - Better error tracking
  - Improved monitoring
* IMPROVED: Enhanced compatibility with WordPress 6.1
* IMPROVED: Enhanced default iiko street handling
  - Better address management
  - Improved data consistency
* FIXED: Resolved guzzlehttp/psr7 security issue
  - Better security
  - Improved protection
* FIXED: Resolved translation issues in JS scripts
  - Better localization
  - Improved user experience

= 2.4.3 (30-01-2023) =
* IMPROVED: Enhanced compatibility with WordPress 6.2
* IMPROVED: Made 'Hold money' setting optional in Loyalty module
  - More flexible payment options
  - Better user control
* FIXED: Resolved Loyalty module issues
  - Better bonus management
  - Improved functionality

= 2.4.2 (12-12-2022) =
* NEW: Added option 'Import only simple products'
  - Better product management
  - Improved import control

= 2.4.1 (25-11-2022) =
* NEW: Added option 'Reverse groups import'
  - Better product organization
  - Improved import flexibility

= 2.4.0 (18-10-2022) =
* IMPROVED: Added button for saving groups for auto import
  - Better import management
  - Improved automation
* IMPROVED: Enhanced compatibility with WordPress 6.1
* FIXED: Resolved translation issues in JS scripts
  - Better localization
  - Improved user experience

= 2.3.9 (05-09-2022) =
* NEW: Added 'Delete old product category photo' option
  - Better media management
  - Improved storage efficiency
* IMPROVED: Separated premium functionality
  - Better code organization
  - Improved maintainability

= 2.3.8 (22-08-2022) =
* FIXED: Resolved bonuses issues with online payment
  - Better payment handling
  - Improved bonus management
* FIXED: Resolved imported streets info display
  - Better address management
  - Improved data display
* FIXED: Renamed apiLogin field to API-key
  - Better clarity
  - Improved terminology
* FIXED: Resolved async import issues
  - Better performance
  - Improved reliability

= 2.3.7 (15-07-2022) =
* NEW: Added option 'Place all orders by current time'
  - Better time management
  - Improved order handling

= 2.3 (28-06-2022) =
* NEW: Added Bonuses (Loyalty program) functionality
  - Better customer rewards
  - Improved loyalty management
* NEW: Added option 'Skip import of unrequired group modifiers'
  - Better import control
  - Improved efficiency
* NEW: Added cross-organization import/export
  - Better data management
  - Improved flexibility
* NEW: Added 'Deliveries and Orders for the kitchen' export mode
  - Better kitchen management
  - Improved order handling

= 2.2 (12-05-2022) =
* NEW: Added localization options
  - Better internationalization
  - Improved language support
* NEW: Added export type option
  - Better order management
  - Improved flexibility
* NEW: Added export action option
  - Better control over exports
  - Improved automation
* NEW: Added import option for removing old product images
  - Better media management
  - Improved storage efficiency
* NEW: Added guests field for checkout
  - Better customer management
  - Improved user experience
* NEW: Added table field for checkout
  - Better order organization
  - Improved restaurant management
* NEW: Added 'Shipping cost as a product' option
  - Better shipping management
  - Improved pricing control
* NEW: Added 'Update stop list after import' option
  - Better inventory management
  - Improved stock control
* NEW: Added support for 'StopListUpdate' webhook
  - Better real-time updates
  - Improved inventory management
* NEW: Added order of products when importing
  - Better product organization
  - Improved display control
* NEW: Added modifiers prices import
  - Better pricing management
  - Improved product customization
* NEW: Added KBZHU support
  - Better nutritional information
  - Improved product details
* IMPROVED: Enhanced product update during import
  - Better data consistency
  - Improved synchronization
* IMPROVED: Enhanced admin bar menu
  - Better navigation
  - Improved user experience

= 2.1 (25-04-2022) =
* NEW: Added support for multiple terminals
  - Better delivery management
  - Improved shipping options
* NEW: Added support for same dishes in different groups
  - Better product organization
  - Improved menu management
* NEW: Added sale price import
  - Better pricing management
  - Improved promotions
* NEW: Added nomenclature import settings
  - Better import control
  - Improved customization
* IMPROVED: Enhanced product update during import
  - Better data consistency
  - Improved synchronization
* IMPROVED: Enhanced admin bar menu
  - Better navigation
  - Improved user experience

= 2.0 (18-03-2022) =
* NEW: Added email notifications for errors
  - Better error tracking
  - Improved monitoring
* NEW: Added support for multiple modifier groups
  - Better product customization
  - Improved flexibility
* NEW: Added 'Complete before' type to order comment
  - Better time management
  - Improved order tracking
* NEW: Added admin bar menu
  - Better navigation
  - Improved user experience
* NEW: Added filter 'wc_iikocloud_order_customer'
  - Better customer data management
  - Improved customization
* IMPROVED: Enhanced 'Complete Before' block interface
  - Better user experience
  - Improved usability
* FIXED: Resolved groups tree display issues
  - Better organization
  - Improved navigation

= 1.3.2 (08-02-2022) =
* NEW: Added auto import of nomenclature using WP CRON
  - Better automation
  - Improved efficiency

= 1.3.1 (20-01-2022) =
* NEW: Added order checking from admin panel
  - Better order management
  - Improved control
* IMPROVED: Enhanced order export comment
  - Better communication
  - Improved tracking
* IMPROVED: Enhanced logging system
  - Better error tracking
  - Improved debugging

= 1.3.0 (15-12-2021) =
* NEW: Added one-time order export on creation
  - Better order management
  - Improved efficiency
* NEW: Added export success notifications
  - Better tracking
  - Improved monitoring
* NEW: Added manual order export
  - Better control
  - Improved flexibility
* NEW: Added filter for customer phone number
  - Better data management
  - Improved customization
* NEW: Added "Complete before" field
  - Better time management
  - Improved scheduling
* NEW: Added address fields processing
  - Better address management
  - Improved validation
* NEW: Added import settings
  - Better control
  - Improved customization
* IMPROVED: Enhanced settings page organization
  - Better navigation
  - Improved usability

= 1.2.0 (30-11-2021) =
* NEW: Added administrator email notifications
  - Better error tracking
  - Improved monitoring

= 1.1.0 (22-10-2021) =
* NEW: Added support for WooCommerce and iiko payment methods
  - Better payment integration
  - Improved flexibility
* IMPROVED: Increased minimum PHP version to 7.2
  - Better compatibility
  - Improved security

= 1.0.0 (15-09-2021) =
* Initial release of the plugin
  - Basic integration with iikoCloud
  - Core functionality implementation
