mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Update deprecated event name
This commit is contained in:
parent
5d406ea612
commit
bb92792420
1 changed files with 3 additions and 3 deletions
|
@ -19,7 +19,7 @@ const PayPalComponent = ({
|
|||
shippingData,
|
||||
isEditing,
|
||||
}) => {
|
||||
const {onPaymentSetup, onCheckoutAfterProcessingWithError, onCheckoutValidation} = eventRegistration;
|
||||
const {onPaymentSetup, onCheckoutFail, onCheckoutValidation} = eventRegistration;
|
||||
const {responseTypes} = emitResponse;
|
||||
|
||||
const [paypalOrder, setPaypalOrder] = useState(null);
|
||||
|
@ -253,7 +253,7 @@ const PayPalComponent = ({
|
|||
}, [onPaymentSetup, paypalOrder, activePaymentMethod]);
|
||||
|
||||
useEffect(() => {
|
||||
const unsubscribe = onCheckoutAfterProcessingWithError(({ processingResponse }) => {
|
||||
const unsubscribe = onCheckoutFail(({ processingResponse }) => {
|
||||
if (onClose) {
|
||||
onClose();
|
||||
}
|
||||
|
@ -267,7 +267,7 @@ const PayPalComponent = ({
|
|||
return true;
|
||||
});
|
||||
return unsubscribe;
|
||||
}, [onCheckoutAfterProcessingWithError, onClose]);
|
||||
}, [onCheckoutFail, onClose]);
|
||||
|
||||
if (config.scriptData.continuation) {
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue