• Resolved tgilber007

    (@tgilber007)


    Hi
    I hope you’re doing well
    By default all orders history appears under my orders tabs, how to exclude wallet orders history in my->account-> orders tab

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

    (@subratamal)

    @tgilber007 Please use bellow attached code in the theme functions.php file to remove the wallet top-up order from the customer order page.

    add_filter('woocommerce_my_account_my_orders_query', 'woocommerce_my_account_my_orders_query_callback');
    
    if(!function_exists('woocommerce_my_account_my_orders_query_callback')){
        function woocommerce_my_account_my_orders_query_callback($query){
            $query['meta_key'] = '_wc_wallet_purchase_credited';
            $query['meta_compare'] = 'NOT EXISTS';
            return $query;
        }
    }
Viewing 1 replies (of 1 total)
  • The topic ‘remove wallet orders history’ is closed to new replies.