• Resolved smartdiyer

    (@smartdiyer)


    Hello Subrata, Thank you for this great plugin.
    I have enabled ‘Product Wise’ cashback on my site. By default, I have kept 5% cashback. I can override that in ‘Edit Product’ page. Since most of my products have 5% CB, I want some specific products to be excluded from cahsback. So I use 0% cashback/ or 0 rs CB, which is not working. If the value is Zero, it will show the default value which is 5%.If the value is either 1 % or rs, it works.

    My other problem is, I want to enable cashback for a minimum cart amount. I am able to change the setting from ‘product wise’ to ‘cart wise’. I can use either one of these. If there is any filter that I can use to enable cart wise CB, would really help me.

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

    (@subratamal)

    @smartdiyer Thanks for reaching out. We have a filter woo_wallet_product_wise_cashback_amount you can exclude products from cashback using this filter. For reference code.

    add_filter('woo_wallet_product_wise_cashback_amount', 'woo_wallet_product_wise_cashback_amount_callback', 10, 2);
    
    if(!function_exists('woo_wallet_product_wise_cashback_amount_callback')){
        function woo_wallet_product_wise_cashback_amount_callback($cashback_amount, $product){
            if(32 === $product->get_id()){
                $cashback_amount = 0;
            }
            return $cashback_amount;
        }
    }

    For second query you can use filter woo_wallet_form_cart_cashback_amount.

    add_filter('woo_wallet_form_cart_cashback_amount', 'woo_wallet_form_cart_cashback_amount_callback');
    
    if(!function_exists('woo_wallet_form_cart_cashback_amount_callback')){
        function woo_wallet_form_cart_cashback_amount_callback($cashback_amount){
            if(wc()->cart->get_total('edit') < 100 ){
                $cashback_amount = 0;
            }
            return $cashback_amount;
        }
    }
    Thread Starter smartdiyer

    (@smartdiyer)

    Thank You Subrata for quality support. I will go through the codes and make adjustments as per my needs.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woo-Wallet Display both Product Wise and Cart Wise Cashback’ is closed to new replies.