== Changelog ==

= 2.5.3 - 04 September, 2026 =
* Fixed: automatic rate updates never ran on shops with regular REST API
  traffic. The rate update scheduler was hooked to rest_api_init without
  limiting the number of accepted arguments, so WordPress passed the
  WP_REST_Server instance into the method's $reset parameter. Every REST
  request therefore restarted the schedule from the current time and cleared
  the last run marker, which pushed the next run permanently into the future.
  Rates stayed frozen at the values stored before the upgrade. Sites with
  block based cart and checkout, the Store API, page builders or headless
  front ends were affected the most, sites with little or no REST traffic were
  not affected. Reported by Performize.it. 

= 2.5.2 - 03 September, 2026 =
* Fixed: currency switching was unreliable when "Currency storage" was set to
  Transient and the option "I am using cache plugin on my site" was enabled.
  In that combination the selected currency could be applied to the prices but
  not to the cart, the checkout totals or the currency switcher itself, so
  different parts of one page could show different currencies.
* Fixed: the selected currency is now applied to requests made by WooCommerce
  Blocks and the Store API, so the block based mini cart, cart and checkout
  render in the visitor's currency.
* Fixed: prices were shown in the shop base currency inside content loaded by
  page builders through the REST API, for example the Bricks side cart and
  Bricks popups.
* Fixed: fee lines (for example custom regional tax or surcharge fees) were not converted 
  when an order was recalculated into another currency in wp-admin — the currency label 
  changed while the fee amount stayed as it was.
* Added: order recalculation on manual currency change can now be customized. 
If a function named woocs_order_recalculated_custom exists on the site, 
the plugin calls it right after an order has been recalculated to another currency 
and before the order is saved, passing the order object, the new currency, 
the previous currency and the exchange rate the order was stored with. 
This makes it possible to override amounts of individual order items, 
for example flat fees that must keep a fixed value in each currency instead 
of being converted by rate. Works with both HPOS and legacy order storage. 
If the function is not declared, behaviour is unchanged.


= 2.5.1 - 27 July, 2026 =
* Fixed: fatal error (infinite loop / memory exhaustion) on the order-received
  and view-order pages when HPOS is disabled

= 2.5.0 - 24 July, 2026 =
* Fixed logic of working: cache site + transient, added localstorage for selection personalization
* Fixed class cron: is_attached() returns false not only when the hook is missing, but also when the stored recurrence differs from the currently configured one. So as soon as those two values disagreed for any reason, every single page request re-attached the event and pushed next a full interval into the future.
* Fixed: order totals could be inflated when saving/editing an order in a currency that uses a comma as the decimal separator (wp-admin order editor)
* Fixed: base currency symbol shown instead of the order currency after saving order items on HPOS

= 2.4.9 - 12 June, 2026 =
* 1 security issue fixed thanks to Nguyen Ba Khanh and Patchstack

= 2.4.8 - 05 June, 2026 =
* [https://pluginus.net/support/topic/unable-to-refund-order-invalid-refund-amount](fix about orders refund)

= 2.4.7 - 22 May, 2026 =
* Improvement: Codebase aligned with WordPress Coding Standards (WPCS) and PluginCheck recommendations.
* 1 security issue fixed thanks to Long Lagon and Wordfence

= 2.4.6 - 16 Mar, 2026 =
* Small fixes
* 2 security issues fixed (Patchstack bounty program, reported by Que Thanh Tuan and timomangcut)
* 1 security issue fixed (Wordfence bounty program, reported by Ren Voza)

= 2.4.5 - 18 Feb, 2026 =
* Added hook woocs_sheduler_rates_updated

= 2.4.4 - 16 Jan, 2026 =
* Set of small fixes
* New hook woocs_price_html
* New REST API endpoint

= 2.4.3.1 - 25 Jul, 2025 =
* Small fixes
* Fix related to new coupon creation in WooCommerce

= 2.4.3 - 24 Jun, 2025 =
* Small fixes
* New option: Rate floor/ceil - set min/max rate boundaries per currency to protect against sharp rate fluctuations
* New hook woocs_init_compatibility_woo_subscriptions for WooCommerce Subscriptions compatibility

= 2.4.2.3 - 06 Nov, 2024 =
* 1 security issue fixed (Wordfence bounty program, reported by mikemyers)

= 2.4.2.2 - 13 Sep, 2024 =
* 1 security issue fixed (Wordfence, reported by Arkadiusz Hydzik)

= 2.4.2.1 - 31 Jul, 2024 =
* 1 security issue fixed (Patchstack, reported by Ananda Dhakal)

= 2.4.2 - 10 Jul, 2024 =
* Bunch of small fixes
* Improved code security

= 2.4.1.9 - 17 Apr, 2024 =
* 1 security issue fixed (Wordfence, reported by stealthcopter)

= 2.4.1.8 - 07 Mar, 2024 =
* 1 security issue fixed (Patchstack, reported by Dhabaleshwar Das)
* New feature: update order rates from order edit screen; analytics table data updated accordingly

= 2.4.1.7 - 19 Dec, 2023 =
* 1 security issue fixed (Wordfence, reported by Lucio Sa)
* 1 minor fix

= 2.4.1.6 - 12 Dec, 2023 =
* 1 security issue fixed (Wordfence, reported by Lucio Sa)

= 2.4.1.5 - 06 Nov, 2023 =
* 1 security issue fixed (Patchstack, reported by Brandon Roldan)

= 2.4.1 - 21 Aug, 2023 =
* New storage type: FOX Session
* New function convert_from_to_currency - convert an amount between any two currencies

= 2.4.0 - 10 Feb, 2023 =
* Heap of small fixes
* New storage type: FOX Session
* New function: convert_from_to_currency

= 2.3.9.4 - 17 Dec, 2022 =
* 1 security issue fixed (WPScan, reported by Erwan Le Rousseau)

= 2.3.9.3 - 15 Dec, 2022 =
* 1 security issue fixed (WPScan, reported by Marc Montpas)

= 2.3.9 - 05 Oct, 2022 =
* Heap of small fixes
* Multiple performance and compatibility improvements

= 2.3.7.5 - 18 Jan, 2022 =
* 1 security issue fixed (WPScan, reported by Krzysztof Zajac)

= 2.3.7.4 - 14 Jan, 2022 =
* Fixed: is_ajax deprecated since WooCommerce 6.1.0, replaced with wp_doing_ajax

= 2.3.7.3 - 07 Dec, 2021 =
* 1 security issue fixed (sanitize and escape)

= 2.3.7.2 - 25 Nov, 2021 =
* Admin panel redesign
* Small code fixes

= 2.3.7 - 19 Jul, 2021 =
* Legacy widgets fix for WordPress 5.8
* 1 security issue fixed
* Small code fixes

= 2.3.5 - 24 May, 2021 =
* Smart Designer added: interactive front-end builder for custom currency switcher designs

= 2.3.4 - 20 Nov, 2020 =
* Memcached and Redis added as currency storage options

= 2.3.3 - 28 Oct, 2020 =
* WooCommerce Session storage improvements
* Compatibility fixes

= 2.2.9 - 15 Jul, 2019 =
* Added currency interest field (markup percentage per currency)
* Added Public/Private currency visibility option
* New Statistics module (currency, country, time of switch - no personal data)
* 3 new autonomous switcher skins: Style 1, Style 2, Style 3
* REST API added
* Admin bar quick access button option

= 2.2.8 - 21 Mar, 2019 =
* Code improvements
* Google aggregator removed (stopped working)
* Added aggregators: Fixer, MicroPyramid, The Free Currency Converter (ECB)
* Added API key field for Fixer and The Free Currency Converter

= 2.2.6 - 25 Oct, 2018 =
* New feature: No GET data in URL - switch currency without appending ?currency=USD

= 2.1.5 - 12 Jan, 2016 =
* New shortcodes: woocs_show_current_currency, woocs_show_custom_price
* New options: Prices without cents, Hide switcher on checkout, Cache plugin compatibility mode
* Cron periods extended: weekly, monthly

= 2.1.4 - 09 Sep, 2015 =
* Price popup showing all currencies near product price
* CSS body class per active currency (e.g. currency-eur)

= 2.0.9 - 29 May, 2015 =
* Currency rates widget and shortcode [woocs_rates]
* Currency converter widget and shortcode [woocs_converter]
* 90% payment gateway compatibility
* Rate conversion filter for developers: woocs_exchange_value

= 1.0.0 - 28 Jun, 2014 =
* Initial release
