0

If users try to pay via their wallet, then there should be a minimum order limit. this condition should only be apple only on when the user tries to pay via wallet.

Plugin Name: TeraWallet - For WooCommerce

Plugin URL: https://wordpress.org/plugins/woo-wallet/

hello everyone, If users try to pay via their wallet, then there should be a minimum order limit. this condition should only be apple only on when the user tries to pay via wallet.

Plugin Name: TeraWallet - For WooCommerce

Plugin URL: https://wordpress.org/plugins/woo-wallet/

SND Dev
  • 1
  • 5

1 Answers1

0

You can try this code which I used on one of my sites:

add_filter( 'woocommerce_available_payment_gateways', 'disable_paypal_below_100' );
 
function disable_paypal_below_100( $available_gateways ) {
    $minimum = 100;
    if ( WC()->cart->total < $minimum ) {
        unset( $available_gateways['paypal'] ); //replace 'paypal' with 'wallet'
    }
    return $available_gateways;
}

You can extend it to match your requirements.

What does this code do?

This code will check if the order total on checkout is less than 100 then it'll remove PayPal from the payment gateway list.

UPDATE:

To enable the WooWallet as a payment gateway again, you can put this code in the functions.php file of your child theme.:

add_filter('woo_wallet_payment_is_available', '__return_true');
Vinay Jain
  • 862
  • 1
  • 3
  • 11