Add restriction for withdraw and set cashback properties2019-08-13T13:55:50+05:30

Home Forums Core Add restriction for withdraw and set cashback properties

Viewing 1 post (of 1 total)
  • Author
    Posts
  • sagarcpatil92
    Participant
    Post count: 1

    1. I am using Terawallet plugin in which I need help with wallet amount withdrawal restriction that customer should only be able to withdraw 95% amount from the wallet.

    2. I want to set cashback offer like for the 3000-5000rs amount customer will get 2% cashback whereas for the 8000, 12000 & 16000rs customer will get 6% cashback.

    For 1st point I have already added code for withdrawal amount restriction u can check below code:

    add_filter(‘is_valid_payment_through_wallet’, ‘__return_false’);
    add_filter(‘woo_wallet_partial_payment_amount’, ‘woo_wallet_partial_payment_amount_callback’);
    function woo_wallet_partial_payment_amount_callback($amount){
    return (woo_wallet()->wallet->get_wallet_balance( get_current_user_id(), ‘edit’ ) * 95) / 100;

    I have unset all payment methods and only using the wallet for checkout, it works fine when I buy products that cost less than wallet balance,
    but when the cart value is greater than wallet balance it does not show that insufficient balance please credit money before buying.
    and I need to update that.

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
WhatsApp