• Resolved shojib13

    (@shojib13)


    Hello, I hope you are doing well.

    I want users to use wallet or coupon at an order. I don’t want users to use both coupon and voucher at the same time. Is there any code I can apply? I have already restricted voucher usage to 20% of an order. So I want users to use either coupons or voucher. Not both at the same time.

    Thanks in advance.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Subrata Mal

    (@subratamal)

    @shojib13 You can modify wallet usage using filter woo_wallet_disable_partial_payment.

    Thread Starter shojib13

    (@shojib13)

    Hi! Thanks for the response. Can you write the code for me please? And should I add to the theme function.php or somewhere else?

    Thread Starter shojib13

    (@shojib13)

    hello is there anyone available to help?

    Plugin Author Subrata Mal

    (@subratamal)

    @shojib13 Use code like this.

    add_filter('woo_wallet_disable_partial_payment', 'woo_wallet_disable_partial_payment_callback');
    if(!function_exists('woo_wallet_disable_partial_payment_callback')){
        function woo_wallet_disable_partial_payment_callback($is_disable){
            if(WC()->cart->get_coupons()){
                return true;
            }
            return $is_disable;
        }
    }
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Wallet usage vs coupon usage’ is closed to new replies.