• Resolved ashu0406

    (@ashu0406)


    Greetings of the day,
    In your earlier support ticket you have mentioned a code to limit the wallet amount usage on checkout. The code was working fine until the latest update.
    Now the code is not working.

    Please help

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

    (@subratamal)

    @ashu0406 Please share the code here.

    Thread Starter ashu0406

    (@ashu0406)

    add_filter(‘is_valid_payment_through_wallet’, ‘__return_false’);
    add_filter(‘woo_wallet_partial_payment_amount’, ‘woo_wallet_partial_payment_amount_callback’, 10);

    function woo_wallet_partial_payment_amount_callback($amount) {
    if (sizeof(wc()->cart->get_cart()) > 0) {
    $cart_total = get_woowallet_cart_total();
    $partial_payment_amount = ($cart_total * 20) / 100;
    if ($amount >= $partial_payment_amount) {
    $amount = $partial_payment_amount;
    }
    }
    return $amount;
    }

    Plugin Author Subrata Mal

    (@subratamal)

    @ashu0406 The code is fine and it is working in our local setup. Please check if you have changed anything else since then.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Limit wallet usage code not working after update’ is closed to new replies.