Fix failed validation response

the 2nd check seems to not needed now
This commit is contained in:
Alex P 2023-10-11 10:43:33 +03:00
parent 613665f43e
commit 18f8b83b61
No known key found for this signature in database
GPG key ID: 54487A734A204D71

View file

@ -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,