From 2f84fc8a6b16a5a21829199fefada01d71507719 Mon Sep 17 00:00:00 2001 From: Francesco Date: Thu, 27 Feb 2025 17:46:25 +0100 Subject: [PATCH] fix: ECE script dependencies with WC 9.7 (#10461) --- changelog/fix-wc9.7-ece-script-dependencies | 4 ++++ .../class-wc-payments-express-checkout-button-handler.php | 1 + 2 files changed, 5 insertions(+) create mode 100644 changelog/fix-wc9.7-ece-script-dependencies diff --git a/changelog/fix-wc9.7-ece-script-dependencies b/changelog/fix-wc9.7-ece-script-dependencies new file mode 100644 index 00000000000..f0d00730f68 --- /dev/null +++ b/changelog/fix-wc9.7-ece-script-dependencies @@ -0,0 +1,4 @@ +Significance: patch +Type: fix + +fix: GooglePay/ApplePay script dependencies with WooCommerce 9.7 diff --git a/includes/express-checkout/class-wc-payments-express-checkout-button-handler.php b/includes/express-checkout/class-wc-payments-express-checkout-button-handler.php index 413b51aa064..073e09b0ad9 100644 --- a/includes/express-checkout/class-wc-payments-express-checkout-button-handler.php +++ b/includes/express-checkout/class-wc-payments-express-checkout-button-handler.php @@ -307,6 +307,7 @@ public function scripts() { } wp_localize_script( 'WCPAY_EXPRESS_CHECKOUT_ECE', 'wcpayExpressCheckoutParams', $express_checkout_params ); + wp_localize_script( 'WCPAY_BLOCKS_CHECKOUT', 'wcpayExpressCheckoutParams', $express_checkout_params ); wp_set_script_translations( 'WCPAY_EXPRESS_CHECKOUT_ECE', 'woocommerce-payments' );