• Resolved Demlaip

    (@jointwebblog)


    Hi Subrata,

    Please help me with offering cashback only for prepaid payment orders, not for COD orders.
    In order to encourage prepaid payments.

    Thanks,
    Pawan

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

    (@subratamal)

    @jointwebblog,

    Please use below code snippet to themes function.php to restrict cashback for COD orders.

    add_filter('woo_wallet_general_cashback_amount', 'woo_wallet_general_cashback_amount', 10, 2);
    
    function woo_wallet_general_cashback_amount($amount, $order_id){
        $order = wc_get_order($order_id);
        if('cod' === $order->get_payment_method('edit')){
            return false;
        }
        return $amount;
    }

    Thanks and Regards,
    Subrata Mal

Viewing 1 replies (of 1 total)
  • The topic ‘Cashback only for prepaid payments, not COD’ is closed to new replies.