• Resolved

    (@educationguideonline)


    Hi, Subrata.
    I want to disable COD option while a customer using Wallet in the checkout page. Please suggest me the code to add.
    Thank you in advance.

    The page I need help with: [log in to see the link]

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

    (@subratamal)

    @educationguideonline,

    Use below code to disable COD when partial payment enabled.

    add_filter('woocommerce_available_payment_gateways', 'woocommerce_available_payment_gateways_callback');
    if(!function_exists('woocommerce_available_payment_gateways_callback')){
        function woocommerce_available_payment_gateways_callback($_available_gateways){
            if(isset($_available_gateways[ 'cod' ]) && is_enable_wallet_partial_payment()){
                unset($_available_gateways[ 'cod' ]);
            }
            return $_available_gateways;
        }
    }

    Thank you.

    Thread Starter

    (@educationguideonline)

    Thanks it worked…..

    Thread Starter

    (@educationguideonline)

    Hello, how to show a message in that case?

    Like- “COD is not available as you selected Wallet”

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable COD while Using Wallet’ is closed to new replies.