Function to disable Cashback feature when open manually order (Backend)2020-05-14T13:55:30+05:30

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

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • T Kit
    Participant
    Post count: 9

    Heya, can anyone help me with the function to disable cashback feature when admin or shop manager opens a manually order via Woocommerce backend.

    Subrata Mal
    Keymaster
    Post count: 175

    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;
        }
    }
    T Kit
    Participant
    Post count: 9

    Thank you seems to be working perfectly 🙂

    T Kit
    Participant
    Post count: 9
    This reply has been marked as private.
    Subrata Mal
    Keymaster
    Post count: 175
    This reply has been marked as private.
    T Kit
    Participant
    Post count: 9
    This reply has been marked as private.
    T Kit
    Participant
    Post count: 9
    This reply has been marked as private.
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.