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 {responseTypes} = emitResponse;
|
||||||
|
|
||||||
const [paypalOrder, setPaypalOrder] = useState(null);
|
const [paypalOrder, setPaypalOrder] = useState(null);
|
||||||
const [gotoContinuation, setGotoContinuation] = useState(false);
|
const [gotoContinuationOnError, setGotoContinuationOnError] = useState(false);
|
||||||
|
|
||||||
const methodId = fundingSource ? `${config.id}-${fundingSource}` : config.id;
|
const methodId = fundingSource ? `${config.id}-${fundingSource}` : config.id;
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ const PayPalComponent = ({
|
||||||
if (config.finalReviewEnabled) {
|
if (config.finalReviewEnabled) {
|
||||||
location.href = getCheckoutRedirectUrl();
|
location.href = getCheckoutRedirectUrl();
|
||||||
} else {
|
} else {
|
||||||
setGotoContinuation(true);
|
setGotoContinuationOnError(true);
|
||||||
onSubmit();
|
onSubmit();
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
@ -172,7 +172,7 @@ const PayPalComponent = ({
|
||||||
if (config.scriptData.continuation) {
|
if (config.scriptData.continuation) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (gotoContinuation && wp.data.select('wc/store/validation').hasValidationErrors()) {
|
if (gotoContinuationOnError && wp.data.select('wc/store/validation').hasValidationErrors()) {
|
||||||
location.href = getCheckoutRedirectUrl();
|
location.href = getCheckoutRedirectUrl();
|
||||||
return { type: responseTypes.ERROR };
|
return { type: responseTypes.ERROR };
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ const PayPalComponent = ({
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
return unsubscribe;
|
return unsubscribe;
|
||||||
}, [onCheckoutValidation, gotoContinuation] );
|
}, [onCheckoutValidation, gotoContinuationOnError] );
|
||||||
|
|
||||||
const handleClick = (data, actions) => {
|
const handleClick = (data, actions) => {
|
||||||
if (isEditing) {
|
if (isEditing) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue