mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Return the callback to fix the shipping options update process
This commit is contained in:
parent
c5fd3a6cea
commit
f9aa2b565d
1 changed files with 6 additions and 0 deletions
|
@ -141,6 +141,7 @@ class Renderer {
|
||||||
// Check the condition and add the handler if needed
|
// Check the condition and add the handler if needed
|
||||||
if ( this.defaultSettings.should_handle_shipping_in_paypal ) {
|
if ( this.defaultSettings.should_handle_shipping_in_paypal ) {
|
||||||
options.onShippingOptionsChange = ( data, actions ) => {
|
options.onShippingOptionsChange = ( data, actions ) => {
|
||||||
|
let shippingOptionsChange =
|
||||||
! this.isVenmoButtonClickedWhenVaultingIsEnabled(
|
! this.isVenmoButtonClickedWhenVaultingIsEnabled(
|
||||||
venmoButtonClicked
|
venmoButtonClicked
|
||||||
)
|
)
|
||||||
|
@ -150,8 +151,11 @@ class Renderer {
|
||||||
this.defaultSettings
|
this.defaultSettings
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
return shippingOptionsChange
|
||||||
};
|
};
|
||||||
options.onShippingAddressChange = ( data, actions ) => {
|
options.onShippingAddressChange = ( data, actions ) => {
|
||||||
|
let shippingAddressChange =
|
||||||
! this.isVenmoButtonClickedWhenVaultingIsEnabled(
|
! this.isVenmoButtonClickedWhenVaultingIsEnabled(
|
||||||
venmoButtonClicked
|
venmoButtonClicked
|
||||||
)
|
)
|
||||||
|
@ -161,6 +165,8 @@ class Renderer {
|
||||||
this.defaultSettings
|
this.defaultSettings
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
return shippingAddressChange
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue