Programmatically disable PP button
-
I need to programmatically disable the PP button in mini cart, cart and checkout for a Minimum Order Modification. For standard Woo payment buttons I can do this with remove_action() but for this plugin I cannot find a way how to handle this.
Can you advise if there’s a way to disable the PayPal payment buttons? The code I use looks like this:
if ( WC()->cart->subtotal_ex_tax < $minimum ) { if( is_cart() ) { remove_action( 'woocommerce_proceed_to_checkout', 'wc_get_pay_buttons', 10 ); remove_action( 'woocommerce_proceed_to_checkout', 'woocommerce_button_proceed_to_checkout', 20 ); } }
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Programmatically disable PP button’ is closed to new replies.