mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Change block variable name.
This commit is contained in:
parent
2f0f0a7e0f
commit
1a2038bd78
1 changed files with 4 additions and 4 deletions
|
@ -31,7 +31,7 @@ const PayPalComponent = ({
|
|||
const {responseTypes} = emitResponse;
|
||||
|
||||
const [paypalOrder, setPaypalOrder] = useState(null);
|
||||
const [gotoContinuation, setGotoContinuation] = useState(false);
|
||||
const [gotoContinuationOnError, setGotoContinuationOnError] = useState(false);
|
||||
|
||||
const methodId = fundingSource ? `${config.id}-${fundingSource}` : config.id;
|
||||
|
||||
|
@ -153,7 +153,7 @@ const PayPalComponent = ({
|
|||
if (config.finalReviewEnabled) {
|
||||
location.href = getCheckoutRedirectUrl();
|
||||
} else {
|
||||
setGotoContinuation(true);
|
||||
setGotoContinuationOnError(true);
|
||||
onSubmit();
|
||||
}
|
||||
} catch (err) {
|
||||
|
@ -172,7 +172,7 @@ const PayPalComponent = ({
|
|||
if (config.scriptData.continuation) {
|
||||
return true;
|
||||
}
|
||||
if (gotoContinuation && wp.data.select('wc/store/validation').hasValidationErrors()) {
|
||||
if (gotoContinuationOnError && wp.data.select('wc/store/validation').hasValidationErrors()) {
|
||||
location.href = getCheckoutRedirectUrl();
|
||||
return { type: responseTypes.ERROR };
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ const PayPalComponent = ({
|
|||
return true;
|
||||
});
|
||||
return unsubscribe;
|
||||
}, [onCheckoutValidation, gotoContinuation] );
|
||||
}, [onCheckoutValidation, gotoContinuationOnError] );
|
||||
|
||||
const handleClick = (data, actions) => {
|
||||
if (isEditing) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue