From d25cba0185420dde46c865dd531aa2b1056e5f0c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 10:33:55 +0000 Subject: [PATCH 1/3] Update version and add changelog entries for release 8.9.2 --- changelog.txt | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- readme.txt | 5 ++++- woocommerce-payments.php | 2 +- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/changelog.txt b/changelog.txt index 840d9540e05..988609711f0 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,7 @@ *** WooPayments Changelog *** += 8.9.2 - 2025-02-19 = + = 8.9.1 - 2025-02-07 = * Fix - Ensures that the tokenised cart for ECE implementation is disabled by default. diff --git a/package-lock.json b/package-lock.json index ded73102317..ffe1e41337a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "woocommerce-payments", - "version": "8.9.1", + "version": "8.9.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "woocommerce-payments", - "version": "8.9.1", + "version": "8.9.2", "hasInstallScript": true, "license": "GPL-3.0-or-later", "dependencies": { diff --git a/package.json b/package.json index 6c1e4288aaf..b5efb52feb5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "woocommerce-payments", - "version": "8.9.1", + "version": "8.9.2", "main": "webpack.config.js", "author": "Automattic", "license": "GPL-3.0-or-later", diff --git a/readme.txt b/readme.txt index d1b7d9f5d2c..60adce8994f 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: woocommerce payments, apple pay, credit card, google pay, payment, payment Requires at least: 6.0 Tested up to: 6.7 Requires PHP: 7.3 -Stable tag: 8.9.1 +Stable tag: 8.9.2 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -87,6 +87,9 @@ You can read our Terms of Service and other policies [here](https://woocommerce. == Changelog == += 8.9.2 - 2025-02-19 = + + = 8.9.1 - 2025-02-07 = * Fix - Ensures that the tokenised cart for ECE implementation is disabled by default. diff --git a/woocommerce-payments.php b/woocommerce-payments.php index 4aefaee907a..244dfec6232 100644 --- a/woocommerce-payments.php +++ b/woocommerce-payments.php @@ -11,7 +11,7 @@ * WC tested up to: 9.6.0 * Requires at least: 6.0 * Requires PHP: 7.3 - * Version: 8.9.1 + * Version: 8.9.2 * Requires Plugins: woocommerce * * @package WooCommerce\Payments From f8f2547f220ab3aa91e00e0d228ea8409514407f Mon Sep 17 00:00:00 2001 From: Leonardo Lopes de Albuquerque Date: Fri, 21 Feb 2025 06:00:30 -0300 Subject: [PATCH 2/3] Fixed possible race condition on the WooPay optin trunk (#10410) --- changelog/fix-woopay-opt-in-race-condition | 4 +++ .../save-user/checkout-page-save-user.js | 29 +++++++++++++++---- 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 changelog/fix-woopay-opt-in-race-condition diff --git a/changelog/fix-woopay-opt-in-race-condition b/changelog/fix-woopay-opt-in-race-condition new file mode 100644 index 00000000000..4e36bc5577c --- /dev/null +++ b/changelog/fix-woopay-opt-in-race-condition @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +Fixed WooPay opt-in race condition diff --git a/client/components/woopay/save-user/checkout-page-save-user.js b/client/components/woopay/save-user/checkout-page-save-user.js index 89c753cae7a..85043da5109 100644 --- a/client/components/woopay/save-user/checkout-page-save-user.js +++ b/client/components/woopay/save-user/checkout-page-save-user.js @@ -275,17 +275,34 @@ const CheckoutPageSaveUser = ( { isBlocksCheckout } ) => { isBlocksCheckout, ] ); + useEffect( () => { + if ( + ! getConfig( 'forceNetworkSavedCards' ) || + ! isWCPayWithNewTokenChosen || + isRegisteredUser + ) { + // Clicking the place order button sets the extension data in backend. If user changes the payment method + // due to an error, we need to clear the extension data in backend. + if ( isBlocksCheckout && userDataSent ) { + sendExtensionData( true ); + } + clearValidationError( errorId ); + } + }, [ + clearValidationError, + errorId, + isBlocksCheckout, + isRegisteredUser, + isWCPayWithNewTokenChosen, + sendExtensionData, + userDataSent, + ] ); + if ( ! getConfig( 'forceNetworkSavedCards' ) || ! isWCPayWithNewTokenChosen || isRegisteredUser ) { - // Clicking the place order button sets the extension data in backend. If user changes the payment method - // due to an error, we need to clear the extension data in backend. - if ( isBlocksCheckout && userDataSent ) { - sendExtensionData( true ); - } - clearValidationError( errorId ); return null; } From b212f3b5d82cda33891cd8460a683d1404cfe46d Mon Sep 17 00:00:00 2001 From: botwoo Date: Fri, 21 Feb 2025 09:03:03 +0000 Subject: [PATCH 3/3] Amend changelog entries for release 8.9.2 --- changelog.txt | 3 ++- changelog/fix-woopay-opt-in-race-condition | 4 ---- readme.txt | 3 ++- 3 files changed, 4 insertions(+), 6 deletions(-) delete mode 100644 changelog/fix-woopay-opt-in-race-condition diff --git a/changelog.txt b/changelog.txt index 988609711f0..ada748198a4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ *** WooPayments Changelog *** -= 8.9.2 - 2025-02-19 = += 8.9.2 - 2025-02-21 = +* Fix - Fixed WooPay opt-in race condition = 8.9.1 - 2025-02-07 = * Fix - Ensures that the tokenised cart for ECE implementation is disabled by default. diff --git a/changelog/fix-woopay-opt-in-race-condition b/changelog/fix-woopay-opt-in-race-condition deleted file mode 100644 index 4e36bc5577c..00000000000 --- a/changelog/fix-woopay-opt-in-race-condition +++ /dev/null @@ -1,4 +0,0 @@ -Significance: patch -Type: fix - -Fixed WooPay opt-in race condition diff --git a/readme.txt b/readme.txt index 60adce8994f..1e087371cdc 100644 --- a/readme.txt +++ b/readme.txt @@ -87,7 +87,8 @@ You can read our Terms of Service and other policies [here](https://woocommerce. == Changelog == -= 8.9.2 - 2025-02-19 = += 8.9.2 - 2025-02-21 = +* Fix - Fixed WooPay opt-in race condition = 8.9.1 - 2025-02-07 =