*** Autopay Changelog ***

### [5.0.5] 2026-09-28 ###
- Fixed: the BLIK Pay Later and instalments payment descriptions displayed as raw HTML code instead of formatted text on checkout.

### [5.0.4] 2026-09-22 ###
- Fixed: the ITN confirmation response sent back to Autopay declared an invalid `standalone=""` XML pseudo-attribute, causing Autopay to reject the response with an XML parse error ("Invalid XML pseudo-attribute 'standalone'"). The attribute is no longer emitted.

### [5.0.3] 2026-09-17 ###
- Fixed: improved Apple Pay availability detection during checkout, preventing empty Apple Pay sections from appearing on unsupported devices and browsers, including when checkout scripts are loaded in a different order.
- Fixed: improved Google Pay error handling to prevent incomplete configuration data from disrupting the payment section during checkout.

### [5.0.2] 2026-09-14 ###
- Fixed: High-Performance Order Storage (HPOS) compatibility declared; order meta reads/writes across the plugin switched to the HPOS-safe order meta API.
- Fixed: payment channel selector on the "Pay for order" (order-pay) page — it previously rendered as a plain description instead of the actual list of payment channels.
- Fixed: BLIK-0 payment on the order-pay page now redirects to the order-received page after payment is started, instead of reloading the order-pay page.
- Fixed: retrying a payment (Google Pay, BLIK with redirect, or the default channel) on the order-pay page after a previous attempt now correctly redirects to the payment gateway again, instead of silently failing with the order left unpaid.
- Fixed: payment channel list on the order-pay page could stay permanently hidden due to a timing issue with WooCommerce's own checkout script; the channel list now always displays.
- Fixed: gateway list API was being called on every page load; it is now only called where actually needed, and channel filtering on the order-pay page was corrected.
- Fixed: Apple Pay / Google Pay wallet group position and internal group configuration, restored after an earlier wallet group-type split.
- Fixed: recording a retry payment attempt for an order that was already tracked internally no longer fails silently — it now updates the existing status record instead of attempting a duplicate database insert.
- Fixed: the minimum PHP version check now correctly enforces PHP 7.4 (the plugin's actual requirement); previously the check only enforced PHP 7.2, allowing the plugin to run — and potentially fail — on unsupported PHP versions.
- Fixed: gateway list cache invalidation (triggered by a site language change) now also clears the WordPress object cache, preventing stale payment channel data from being served on hosts using persistent object caching (Redis/Memcached).
- Security: customer personal data (name, email, phone, IP address, bank account number) is now redacted from ITN debug logs before being written to disk.
- Improved: express payment redirect now auto-detects from order meta when the URL parameter is absent, improving reliability of the redirect-to-gateway flow.
- Fixed: several internal diagnostics/logging bugs found during an internal refactor of the gateway class (a payment channel group title not displaying, a fatal error when an order contained virtual products only, incorrect GA4 event data types, and a PHP 7.4 compatibility issue with typed properties).

### [5.0.1] 2026-08-06 ###
- Fixed: XSS vulnerabilities — escaped output across all admin templates and settings fields using `esc_html_e()`, `esc_attr_e()`, `esc_url()`, and `wp_kses_post()` instead of unescaped `_e()` / `echo`.
- Fixed: CSRF protection hardened — nonce verification added to payment-on-account-page handler, CSS editor, and legacy configuration importer.
- Fixed: input sanitization improved — added `wp_unslash()` before `sanitize_text_field()` across all `$_POST`/`$_GET` reads; BLIK code validated as exactly 6 digits.
- Fixed: Test Connection security — added `current_user_can('manage_woocommerce')` check; previously unauthenticated users could trigger test transactions.
- Fixed: open redirect vulnerability — replaced `wp_redirect()` with `wp_safe_redirect()` combined with an explicit allowed-hosts list for the payment gateway domain.
- Fixed: direct file access guard — added `defined('ABSPATH') || exit` to all PHP source files.
- Fixed: stored CSS output sanitized via `wp_strip_all_tags()` to prevent `</style>` breakout in the custom CSS editor.
- Fixed: debug log output — replaced `serialize()` and `print_r()` with `wp_json_encode()` to avoid accidental data exposure in logs.
- Fixed: Polish translations now load correctly — bundled `.mo` file is prioritised, resolving partial Polish UI under WordPress 6.7+ JIT loading.
- Fixed: removed redundant `load_plugin_textdomain()` call from `compatibility.php`.
- Fixed: plugin entry point file reverted to `bluemedia-woocommerce.php`.
- Fixed: settings page — reset button (`bm_reset_order`) now works correctly.
- Fixed: payment channels list — class attribute properly escaped.

### [5.0.0] 2026-07-06 ###
- Added: card payments through the Autopay widget on classic and block checkout.
- Fixed: PHP Deprecated notice on PHP 8.4+ during GA4 event handling for Google Pay payments.
- Updated: isolated GA4 Measurement Protocol library to version 0.1.6.
- Updated: isolated Guzzle dependency to version 7.12.3 to resolve security advisories.

### [4.9.3] 2026-06-29 ###
- Improved: admin panel typography using locally hosted Open Sans and Roboto Condensed fonts aligned with the new design system.
- Fixed: GA4 transaction attribution by linking purchase events to the user’s session data.
- Fixed: test connection endpoint security, and HMAC typing and signature comparison.

### [4.9.2] 2026-06-22 ###
- Added: a new setting to choose how Google Pay works — redirect to the Google Pay website or pay directly in your store
- Added: settings to match the logo to the checkout color scheme, including light and dark versions
- Improved: interface styles in the plugin settings and on checkout (checkboxes, buttons)
- Improved: button focus visibility and accessibility during keyboard navigation
- Fixed: an error on pages using the block editor when the payment method list could not be retrieved
- Fixed: the selected bank was not preserved after the checkout refreshed on classic checkout
- Fixed: compatibility with PHP 8.4 and 8.5 — resolved issues causing notices on newer PHP versions

### [4.9.1] 2026-04-16 ###
- Fixed: the **Payment started** WooCommerce order status (Advanced → Payment statuses) is now applied when the customer begins checkout payment (standard redirect, Google Pay, and BLIK‑0). Previously the order was always set to Pending payment, ignoring this setting.

### [4.9.0] 2026-04-07 ###
- Google Pay on checkout is aligned with WooCommerce: the method is offered when shoppers must accept terms and conditions using a checkbox (classic checkout settings and block checkout with the Terms block checkbox enabled)
- Block checkout: payment method list reflects the same Google Pay availability rules as on classic checkout
- Classic checkout: smoother handling of the place order button in combination with Autopay checkout scripts

### [4.8.3] 2026-03-09 ###
- Analytics component - a new optional setting: "ITN SUCCESS triggering the event ‘Completion of transaction’ instead of order status"

### [4.8.2] 2026-02-17 ###
- Improved webhook processing logic for better integration with third-party plugins
- Adding a multilingual readme

### [4.8.1] 2026-02-02 ###
- Added support for additional currencies: USD (US Dollar) and GBP (British Pound).
- Improvements in ITN processing
- Updated library versions (php-ga4-mp, GuzzleHTTP)
- Fixed handling of unsupported currencies
- Fixed in the “Login during checkout” flow
- Minor fixes and improvements

### [4.8.0] 2026-01-14 ###
- Translations of the plugin into Spanish, Italian and German have been added.
- The ability to edit the name and description of payment methods in the administration panel and their presentation on the checkout page has been added.
- Support for saving and reading the display order of payment methods on the checkout page has been added.
- The frontend layer has been adjusted to present payment methods according to the configured order on checkout.
- Paywall v3 – better support for payment option grouping.
- The ‘Test Connection’ function has been expanded with additional verification of the shop configuration on the customer's side.

### [4.7.1] 2025-11-20 ###
- Changes to messages for test connection for the new supported version of PHP 8.3
- Changes to the text of the plugin configuration instructions
- Changes to the currency verification logic on the website
- Fix for test connection verification when sandbox mode is enabled for the administrator
- Fixed an issue with the Autopay plugin working in conjunction with other currency plugins

### [4.7.0] 2025-08-18 ###
- Added: gatewayList/v3 Added - integration with new endpoint
     Details:
		- Extended configuration parameters
		- Advanced communication with payment gateways
		- Support for more payment options
- Improved: Test Connection - PHP 8.3 integration updated

## [4.6.4] - 2025-07-28

### Added
- **Improved ITN status processing**
- **Full HPOS support**

### Fixed
- Test Connection module is now compatible with the ”Sandbox Mode for logged-in administrator” option
- In certain scenarios, REST API requests cause a fatal error in the multi-currency module


## [4.6.3] - 2025-05-21

### Fixed **Test Connection** - Improved compatibility with production environment.


## [4.6.2] - 2025-05-12

### Fixed **Test Connection** - Transaction test implementation on production mode.

## [4.6.1] - 2025-04-29

### Added
- **Product feed** Added support for Autopay Product ADS – enabled product feed generation and implementation of advertising tags required for the service.

## [4.6.0] - 2025-04-22

### Added
- **Test Connection – Module Diagnostic Tool** - A tool for verifying configuration and connectivity, allowing users to independently check if the module is working correctly and quickly verify the store’s setup. It helps ensure that all components required for processing payments are functioning as expected.
	Features:
		Checks the server environment, API connection, and payment configuration
		Includes tests for PHP, database, HTTPS, internet access, and WooCommerce/module versions
		Verifies availability of payment channels and transaction processing (e.g. BLIK, ITN notifications)
		Provides recommended guidance based on test results
		Option to download test logs

### Fixed
- **Classic checkout** - Autopay payment method description now includes the names of only those payment channels that are available in the store.
- **Multicurrency** - A critical error in the multicurrency module in some configurations.


## [4.5.1] - 2025-03-19

### Fixed
- **Checkout** - Validation and UI fixes for Blik field
- **Multicurrency** - Problems with currency detection in some scenarios
- **Debugger** - Debug mode optimizations

## [4.5.0] - 2025-02-26

### Added
- **Multi-currency Support** - We have added multi-currency support in a single Autopay plugin, allowing merchants to more easily manage transactions in different currencies.
	Benefits:
		Simplicity: Manage all payments in one plugin panel.
		Wider reach: Support for international transactions.
		Better customer experience: Ability to pay in local currency.

## [4.4.0] - 2024-11-06

### Changes
- **Simplified configuration for the merchant** - The number of configuration steps has been significantly reduced, making it quicker and easier to start using the plugin. A clear interface and a reduction in the amount of data required minimises the time required for configuration.

### Added
- **Support for BLIK-0 payments on the block checkout** - We have introduced support for BLIK-0 payments directly on the block checkout. Users can now use the fast and convenient BLIK-0 option without any additional work, increasing conversions and making it easier to finalise purchases.
- **Adaptation to the FunnelKit Funnel Builder plugin** - The plugin is now compatible with FunnelKit Funnel Builder, allowing for easy integration and the creation of advanced purchase funnel paths.

## [4.3.4] - 2024-08-12

### Fixed
- **Checkout Page** - Fixed the issue with redirecting to payment on classic Checkout in case of editing address details.

## [4.3.3] - 2024-08-01

### Added
- **Settings** - Added a new section: Services for You, aimed at supporting merchants in running an efficient store.

### Changes
- **Settings** - Redesigned the informational banner.

### Fixed
- **My Account Page** - Fixed the issue with redirecting to payment for the Blik-0 payment method on the My Account page.

## [4.3.2] - 2024-07-04

### Fixed
- **Checkout** - Fix purchasing process issues that can occur in specific configurations of the Merchant environments.

## [4.3.1] - 2024-06-24

### Added
- **Custom CSS Editor** - Now you can add your individual look to our Paywall, tailoring it to your customers' needs.
- **Option to Override Order Received URL** - Customize the URL customers are redirected to after placing an order.
- **GA4: Option to Change Conversion Order Status** - You decide when the conversion counts!

### Fixed
- **BLIK-0 Payment Status** - Payment status now updates properly.
- **WC Session Initialization** - Fixed initialization issues in some scenarios.
- **Redirect to Payment** - Resolved issues with redirecting to payment in various situations.
- **Custom Gateway URL Redirect** - Fixed issues with redirecting when using a custom gateway URL.
- **Custom Transaction Start Endpoint** - Now works correctly in different scenarios.
- **Translations** - Improved and updated GA4 field descriptions.

### Improved
- **Documentation** - Now more comprehensive and user-friendly!

We are excited to bring you these latest updates and improvements. Your feedback is invaluable and helps us continually enhance our products. Thank you for being with us!

## [4.3.2] - 2024-07-04

### Fixed
- **Checkout** - Fix purchasing process issues that can occur in specific configurations of the Merchant environments.


## [4.3.1] - 2024-06-24

### Added
- **Custom CSS Editor** - Now you can add your individual look to our Paywall, tailoring it to your customers' needs.
- **Option to Override Order Received URL** - Customize the URL customers are redirected to after placing an order.
- **GA4: Option to Change Conversion Order Status** - You decide when the conversion counts!

### Fixed
- **BLIK-0 Payment Status** - Payment status now updates properly.
- **WC Session Initialization** - Fixed initialization issues in some scenarios.
- **Redirect to Payment** - Resolved issues with redirecting to payment in various situations.
- **Custom Gateway URL Redirect** - Fixed issues with redirecting when using a custom gateway URL.
- **Custom Transaction Start Endpoint** - Now works correctly in different scenarios.
- **Translations** - Improved and updated GA4 field descriptions.

### Improved
- **Documentation** - Now more comprehensive and user-friendly!

We are excited to bring you these latest updates and improvements. Your feedback is invaluable and helps us continually enhance our products. Thank you for being with us!

## [4.3.0] - 2024-04-26
### Added
- Block payment (white label)
### Fixed
- Problems with redirection to payment in some scenarios

## [4.2.9] - 2024-04-02
### Fixed
- Styles
- Displaying description on non-whitelabel mode
- Order notes
- Minor fixes

### Added
- Option: alternative transaction start URL
- Improvement debugger

## [4.2.8] - 2024-02-13
### Updated
- Payment methods integration

### Fixed
- Blik-0 issues for some scenarios
- Apple Pay method visibility problem
- Styles
- Payment process on "My account" page
- Email payment link support

### Added
- Ability to migrate settings from 2.x and 3.x plugins

## [4.2.7] - 2024-01-18
### Fixed
- CSS fixes

### Added
- Block Editor support (express payment)##

## [4.2.6] - 2023-12-11
### Added
- Option: Compatibility mode with third-party plugins that reload checkout fragments

### Fixed
- CSS minor fixes

## [4.2.5] - 2023-11-28
### Added
- Show countdown screen before redirection to increase compatibility
- Minor changes in Admin Panel

### Fixed
- CSS compatibility issues

## [4.2.4] - 2023-11-05
### Added
- Debug mode improved

### Fixed
- Minor CSS fixes
- Redirect to payment loop issue for some scenarios

## [4.2.3] - 2023-10-19
### Added
- Ability to assign a separate status for virtual products
- Debug and testing new features

### Fixed
- Settings texts updates
- An order cannot be paid if there is only one payment method available to the partner
- Styles

## [4.2.2] - 2023-10-02
### Fixed
- Translations

## [4.2.1] - 2023-09-29
### Fixed
- Translations
- Blik: problem with code starting with "0"
- Improved payment method selection UI
- Fatal error during a page update in a specific scenario

## [4.2.0] - 2023-08-31
### Added
- Rebranding

## [4.1.26] - 2023-08-24
### Added
- Blik-0 support

### Fixed
- Minor fixes
- Styles

## [4.1.25] - 2023-08-03
### Fixed
- Blik redirect fix

## [4.1.24] - 2023-07-28
### Added
- New bank list styles
- New module: Preview payment methods in Admin Panel

## [4.1.23] - 2023-06-22
### Added
- Improved checkout UI

### Fixed
- Styles
- Minor fixes

## [4.1.21] - 2023-05-08
### Fixed
- Show log only on demand

## [4.1.20] - 2023-05-05
### Fixed
- Fatal error on activate / deactivate hook for some scenarios

## [4.1.19] - 2023-05-02
### Fixed
- Redirect to payment issues for some scenarios
- WP 6.2 compatibility

## [4.1.18] - 2023-03-27
### Added
- Astra theme support

## [4.1.17] - 2023-03-21
### Fixed
- Styles

## [4.1.16] - 2023-03-08
### Added
- Protection against accidentally installing the development version instead of the production package

### Fixed
- Missing call of payment_complete() method on Order object

## [4.1.15] - 2023-02-23
### Updated
- Docs

## [4.1.14] - 2023-02-23
### Updated
- Update frontend scripts
- Update translations
- Update docs
- PayPO whitelabel descriptions

## [4.1.13] - 2023-02-17
### Fixed
- Update plugin core
- Update translations
- Update docs

## [4.1.12] - 2023-01-23
### Fixed
- Minor fixes
- Fix Google Analitics module: submit proper value of pseudo_user_id field

## [4.1.11] - 2023-01-12
### Updated
- Ga4 integration
- Docs

### Fixed
- Unpaid order cancel feature
- Minor fixes
- Admin panel fixes

### Added
- Payment channels grouping refactor

## [4.1.10] - 2022-11-10
### Updated
- Documentation

## [4.1.9] - 2022-11-02
### Updated
- Documentation

## [4.1.8] - 2022-11-02
### Added
- First release on wp.org

## [4.1.7] - 2022-10-26
### Fixed
- Fatal error in Item_In_Cart_DTO.php

## [4.1.6] - 2022-10-21
### Updated
- Documentation

## [4.1.5] - 2022-10-20
### Fixed
- Fatal error in Item_In_Cart_DTO.php

## [4.1.4] - 2022-10-17
### Fixed
- GA4

## [4.1.3] - 2022-10-11
### Fixed
- Fatal error on change order status
- Minor fixes

### Added
- Tutorial banner on bm setting page

## [4.1.2] - 2022-10-06
### Fixed
- Minor fixes

### Added
- GA4 support
- Settings page updates

## [4.0.10] - 2022-08-19
### Fixed
- Docs

## [4.0.9] - 2022-08-19
### Fixed
- Docs

## [4.0.8] - 2022-08-19
### Fixed
- Docs

## [4.0.7] - 2022-08-19
### Fixed
- Minor fixes

## [4.0.6] - 2022-07-27
### Fixed
- README.md revert

## [4.0.5] - 2022-07-27
### Fixed
- CSS fix

## [4.0.4] - 2022-07-20
### Fixed
- Plugin boilerplate refactor

## [4.0.3] - 2022-07-15
### Fixed
- Show API errors only if BLUE_MEDIA_DEBUG constant is defined
