• Resolved beechws

    (@beechws)


    I’d like to be able to exclude certain products from payment by wallet.

    The product I’ve shown in the link is basically a wallet top up with a bonus added by the site. When the customer pays £176 they get £200 in their wallet.

    If they already have credit in their wallet I don’t want them to be able to pay with their wallet contents and get more free credit!

    Is there any way to stop this happening please?

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

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

    (@subratamal)

    @beechws You can use woo_wallet_payment_is_available filter to exclude wallet payment.

    Thread Starter beechws

    (@beechws)

    Thanks! Assuming I add that to functions.php? Would that relate to just selected products or all of them?

    Plugin Author Subrata Mal

    (@subratamal)

    @beechws Using that filter you have to write custom code.

    Thread Starter beechws

    (@beechws)

    Ok thanks again for your reply. Do you have an example code snippet please that I could use as a starting point?

    Plugin Author Subrata Mal

    (@subratamal)

    add_filter('woo_wallet_payment_is_available', 'woo_wallet_payment_is_available_callback');
    if(!function_exists('woo_wallet_payment_is_available_callback')){
        function woo_wallet_payment_is_available_callback($is_available){
            if(63 === $product_id){
                $is_available = false;
            }
            return $is_available;
        }
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Excluding products for wallet payment’ is closed to new replies.