Return the callback to fix the shipping options update process

This commit is contained in:
Narek Zakarian 2024-07-15 19:20:24 +04:00
parent c5fd3a6cea
commit f9aa2b565d
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7

View file

@ -141,6 +141,7 @@ class Renderer {
// Check the condition and add the handler if needed
if ( this.defaultSettings.should_handle_shipping_in_paypal ) {
options.onShippingOptionsChange = ( data, actions ) => {
let shippingOptionsChange =
! this.isVenmoButtonClickedWhenVaultingIsEnabled(
venmoButtonClicked
)
@ -150,8 +151,11 @@ class Renderer {
this.defaultSettings
)
: null;
return shippingOptionsChange
};
options.onShippingAddressChange = ( data, actions ) => {
let shippingAddressChange =
! this.isVenmoButtonClickedWhenVaultingIsEnabled(
venmoButtonClicked
)
@ -161,6 +165,8 @@ class Renderer {
this.defaultSettings
)
: null;
return shippingAddressChange
};
}