Skip to content

Commit 8df4dfa

Browse files
committed
Fix ECEs and PRBs for WooCommerce 9.8.0+ (#4212)
* Fix ECEs and PRBs for WooCommerce 9.8.0+ * Add comment * Add readme and changelog entries * Update changelog and readme to specify block pages scope
1 parent a43ce84 commit 8df4dfa

File tree

5 files changed

+24
-21
lines changed

5 files changed

+24
-21
lines changed

changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
*** Changelog ***
22

3+
= 9.3.2 - xxxx-xx-xx =
4+
* Fix - Fix express checkout for block cart and block checkout for WooCommerce 9.8.0+.
5+
36
= 9.3.1 - 2025-03-14 =
47
* Fix - Temporarily disables the subscriptions detached notice feature due to long loading times on stores with many subscriptions.
58
* Fix - Update ACH capability check key

client/blocks/payment-request/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { getSetting } from '@woocommerce/settings';
21
import { __ } from '@wordpress/i18n';
32
import { PAYMENT_METHOD_NAME } from './constants';
43
import { PaymentRequestExpress } from './payment-request-express';
@@ -56,7 +55,8 @@ const paymentRequestPaymentMethod = {
5655
pending: true,
5756
},
5857
currency: cartData?.cartTotals?.currency_code?.toLowerCase(),
59-
country_code: getSetting( 'baseLocation', {} )?.country,
58+
country_code: getBlocksConfiguration()?.baseLocation
59+
?.country,
6060
displayItems: [],
6161
},
6262
shipping_required: false,

client/blocks/upe/index.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,24 @@ if ( getBlocksConfiguration()?.isSPEEnabled ) {
5454
} );
5555
}
5656

57-
// Register Express Checkout Elements.
58-
if (
59-
getBlocksConfiguration()?.isAmazonPayAvailable && // Hide behind feature flag so the editor does not show the button.
60-
getBlocksConfiguration()?.isAmazonPayEnabled
61-
) {
62-
registerExpressPaymentMethod( expressCheckoutElementAmazonPay( api ) );
63-
}
64-
if ( getBlocksConfiguration()?.isPaymentRequestEnabled ) {
65-
registerExpressPaymentMethod( expressCheckoutElementApplePay( api ) );
66-
registerExpressPaymentMethod( expressCheckoutElementGooglePay( api ) );
67-
}
68-
if ( getBlocksConfiguration()?.isLinkEnabled ) {
69-
registerExpressPaymentMethod( expressCheckoutElementStripeLink( api ) );
57+
if ( getBlocksConfiguration()?.isECEEnabled ) {
58+
// Register Express Checkout Elements.
59+
if (
60+
getBlocksConfiguration()?.isAmazonPayAvailable && // Hide behind feature flag so the editor does not show the button.
61+
getBlocksConfiguration()?.isAmazonPayEnabled
62+
) {
63+
registerExpressPaymentMethod( expressCheckoutElementAmazonPay( api ) );
64+
}
65+
if ( getBlocksConfiguration()?.isPaymentRequestEnabled ) {
66+
registerExpressPaymentMethod( expressCheckoutElementApplePay( api ) );
67+
registerExpressPaymentMethod( expressCheckoutElementGooglePay( api ) );
68+
}
69+
if ( getBlocksConfiguration()?.isLinkEnabled ) {
70+
registerExpressPaymentMethod( expressCheckoutElementStripeLink( api ) );
71+
}
7072
} else {
7173
// Register Stripe Payment Request.
74+
// TODO: We can remove this once we're sure everyone on the new checkout (UPE) has been migrated to ECE.
7275
registerExpressPaymentMethod( paymentRequestPaymentMethod );
7376
}
7477

includes/class-wc-stripe-blocks-support.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ public function get_payment_method_data() {
200200
'customLabel' => $this->payment_request_configuration->get_button_label(),
201201
],
202202
'style' => $this->get_style(),
203+
'baseLocation' => wc_get_base_location(),
203204
]
204205
);
205206
}

readme.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
110110

111111
== Changelog ==
112112

113-
= 9.3.1 - 2025-03-14 =
114-
* Fix - Temporarily disables the subscriptions detached notice feature due to long loading times on stores with many subscriptions.
115-
* Fix - Update ACH capability check key
116-
* Fix - Update legacy checkout documentation links and deprecation notice display logic
117-
* Fix - Fixes an issue where the order signature retrieval method could throw a fatal error when the received order parameter is actually an OrderRefund object (instead of a WC_Order).
118-
* Fix - Fixes an error with the `filter_thankyou_order_received_text` filter when it does not receive a valid WC_Order instance.
113+
= 9.3.2 - xxxx-xx-xx =
114+
* Fix - Fix express checkout for block cart and block checkout for WooCommerce 9.8.0+.
119115

120116
[See changelog for all versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).

0 commit comments

Comments
 (0)