mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Hide button if there is a subscription switch in cart
This commit is contained in:
parent
f4792b5349
commit
86bf3f30d1
1 changed files with 1 additions and 1 deletions
|
@ -643,7 +643,7 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
|
|||
add_action(
|
||||
$this->proceed_to_checkout_button_renderer_hook(),
|
||||
function() use ( $enabled_on_cart ) {
|
||||
if ( ! is_cart() || ! $enabled_on_cart || $this->is_free_trial_cart() || $this->is_cart_price_total_zero() ) {
|
||||
if ( ! is_cart() || ! $enabled_on_cart || $this->is_free_trial_cart() || $this->is_cart_price_total_zero() || isset(reset(WC()->cart->cart_contents)['subscription_switch']) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue