Reply To: Function to disable Cashback feature when open manually order (Backend)2020-05-14T19:27:54+05:30

Home Forums Core Function to disable Cashback feature when open manually order (Backend) Reply To: Function to disable Cashback feature when open manually order (Backend)

Subrata Mal
Keymaster
Post count: 207

Hi,

Please use the attached code.

add_filter('process_woo_wallet_general_cashback', 'process_woo_wallet_general_cashback_callback', 10, 2);
if(!function_exists('process_woo_wallet_general_cashback_callback')){
    function process_woo_wallet_general_cashback_callback($is_process, $order){
        if(!$order->is_created_via('checkout')){
            $is_process = false;
        }
        return $is_process;
    }
}
WhatsApp