mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
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:
commit
8d0dd26f87
4 changed files with 18 additions and 12 deletions
|
@ -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(
|
||||
|
|
|
@ -1295,6 +1295,7 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
|
|||
'is_logged' => is_user_logged_in(),
|
||||
),
|
||||
'should_handle_shipping_in_paypal' => $this->should_handle_shipping_in_paypal && ! $this->is_checkout(),
|
||||
'needShipping' => WC()->cart->needs_shipping(),
|
||||
'vaultingEnabled' => $this->settings->has( 'vault_enabled' ) && $this->settings->get( 'vault_enabled' ),
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue