How to Disable Paypal on Orders Above $200 in WooCommerce?

This is a cool function you can apply to any payment gateways for any order edge. for instance, you might need to cripple bank transfer if orders are beneath $10, or impair PayPal payment if orders are over a specific truck all out.

Hide PayPal Geteway on WooCommerce Orders above $200

[php]
</pre>
add_filter( ‘woocommerce_available_payment_gateways’, ‘wbcomdesign_disable_paypal_above_200’ );

function wbcomdesign_disable_paypal_above_200( $available_gateways ) {
$maximum = 200;
if ( WC()->cart->total > $maximum )
{
unset( $available_gateways[‘paypal’] );
}
return $available_gateways;
}
<h3></h3>
<pre>
[/php]

WooCommerce Disable Payment Methods based on cart conditions plugin

You can make AND as well as conditions. for example “Enable paypal when the absolute request is > $100 and < $200”.

Leave a Reply

Your email address will not be published. Required fields are marked *