Merge pull request #2266 from woocommerce/PCP-3177-shipping-callback-doesnt-work-in-2-7-1-rc-5

Enable the Shipping Callback handlers (3177)
This commit is contained in:
Emili Castells 2024-05-27 15:57:50 +02:00 committed by GitHub
commit b54bb7f807
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -102,10 +102,10 @@ class Renderer {
},
};
// Check the condition and add the onShippingOptionsChange handler if needed
// Check the condition and add the handler if needed
if (this.shouldHandleShippingInPaypal(venmoButtonClicked)) {
options.onShippingOptionsChange = (data, actions) => null;
options.onShippingAddressChange = (data, actions) => null;
options.onShippingOptionsChange = (data, actions) => handleShippingOptionsChange(data, actions, this.defaultSettings);
options.onShippingAddressChange = (data, actions) => handleShippingAddressChange(data, actions, this.defaultSettings);
}
return options;