From 18f8b83b61bdf0347a20566ae53ebbecc779439c Mon Sep 17 00:00:00 2001 From: Alex P Date: Wed, 11 Oct 2023 10:43:33 +0300 Subject: [PATCH] Fix failed validation response the 2nd check seems to not needed now --- modules/ppcp-blocks/resources/js/checkout-block.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/modules/ppcp-blocks/resources/js/checkout-block.js b/modules/ppcp-blocks/resources/js/checkout-block.js index ab4fbd3f9..99cd94799 100644 --- a/modules/ppcp-blocks/resources/js/checkout-block.js +++ b/modules/ppcp-blocks/resources/js/checkout-block.js @@ -148,7 +148,7 @@ const PayPalComponent = ({ } if (wp.data.select('wc/store/validation').hasValidationErrors()) { location.href = getCheckoutRedirectUrl(); - return false; + return { type: responseTypes.ERROR }; } return true; @@ -211,12 +211,6 @@ const PayPalComponent = ({ } const unsubscribeProcessing = onPaymentSetup(() => { - if (wp.data.select('wc/store/validation').hasValidationErrors()) { - return { - type: responseTypes.ERROR, - }; - } - if (config.scriptData.continuation) { return { type: responseTypes.SUCCESS,