Merge pull request #2429 from woocommerce/PCP-3385-can-not-pay-from-block-cart-and-block-checkout-when-shipping-callback-enabled-and-no-shipping-methods-defined

Can't pay from block pages when the shipping callback is enabled and no shipping methods defined (3385)
This commit is contained in:
Emili Castells 2024-08-22 10:51:11 +02:00 committed by GitHub
commit 8d0dd26f87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 18 additions and 12 deletions

View file

@ -139,7 +139,7 @@ class Renderer {
};
// 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 && this.defaultSettings.needShipping ) {
options.onShippingOptionsChange = ( data, actions ) => {
let shippingOptionsChange =
! this.isVenmoButtonClickedWhenVaultingIsEnabled(