• Resolved amir3233

    (@amir3233)


    hi
    in my checkout page if the user wants to use the wallet balance then i want the user can pay only with any other payment gateway but not cash on delivery.please suggest me.

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

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

    (@subratamal)

    @amir3233,

    Please use below code to theme function.php file.

    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(!is_admin() && !is_full_payment_through_wallet()){
                if(isset($available_gateways['cod'])){
                    unset($available_gateways['cod']);
                }
            }
            return $available_gateways;
        }
    }
    Thread Starter amir3233

    (@amir3233)

    Thanks for your replay
    Please see the link https://r2sell.com/wp-content/uploads/2018/11/sdf.png
    here if the user selects the check box of pay by wallet then hide cod.if not then both the payment option should avail for user.

    Thread Starter amir3233

    (@amir3233)

    Is there anyone to reply ???

    Plugin Author Subrata Mal

    (@subratamal)

    @amir3233,

    Sorry for delayed response. The functionality you are requested is not possible. As WooCommerce doesn’t refresh payment gateway options upon certain condition.

    Thank you.

    Plugin Author Subrata Mal

    (@subratamal)

    @amir3233,

    Now, this option is available in the latest WooCommerce version. Please update WooCommerce plugin to the latest version and use below code to theme function.php file.

    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.

    Hey i used this code but the checkbox is coming on the right side. How can i put the checkbox on left side?
    check this image- https://www.mediafire.com/view/4zg1iaj66l12s8b/Wallet_tick.png/file

    Plugin Author Subrata Mal

    (@subratamal)

    @veneetsayyer11 for that you have to override partial payment template in the theme folder.

    when user cart value exceed the wallet balance , it automatically detect from wallet
    please stop that, customer want keep the wallet balance.
    stop automatic detect from wallet to pay.
    https://prnt.sc/nu6oby

    https://prnt.sc/nu6nzw

    Plugin Author Subrata Mal

    (@subratamal)

    Hi @thiru12

    Please disable “Auto deduct wallet balance for partial payment” option. You can find this option under TeraWallet > settings > General tab.

    Thank you.

    Yes, i disabled partial payments but yet it keeps bringing button/check box asking if user want to deduct from wallet… Please i need to stop this.

    Plugin Author Subrata Mal

    (@subratamal)

    Please use below code in theme function.php file to disable partial payment.

    add_filter('woo_wallet_disable_partial_payment', '__return_true');

    Let me try it out!

    this code is not working anymore

    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;
    }
    }

    I need woo wallet deduct hook, I’m planning on using in customized code which I’m currently using for mycred deduct on gravityform submission.

    How can I make sure that my customers use only 20% money from his Tera wallet?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘restrict the uses of wallet balance at checkout’ is closed to new replies.