Black Friday & Cyber Monday SUPER SALE ALL WEEK:
Grab 40% OFF on plugins
Days
Hours
Minutes
Seconds

How to Hide Order Status Column from My Account > Orders Page?

Creating a less cluttered interface is a top priority for store owners, as it significantly impacts the user experience for customers. This customization involves hiding either the entire order status column or specific order statuses from the My Account Orders page. The decision on which approach to take depends on the unique requirements of your business.

Solution 1: Hide Order Status Column from My Account > Orders Page

The code snippet will help to remove the status column of the orders table present in the My Account Orders Page.

add_filter('woocommerce_my_account_my_orders_columns', 'ts_hide_status_column', 10);

function ts_hide_status_column($order){
  unset($order['order-status']);
  return $order;
}

Output

The output image shows that the status column is been hidden from the orders table of the My Account >Orders page.

How to Hide Order Status Column from My Account > Orders Page? - Tyche Softwares

Solution 2: Hide a Specific Order Status from the Status Column of My Account > Orders Page

When you have created custom order statuses (e.g. Ready to Ship, Scheduled) in your store, then you might want to skip these statuses to be shown and focus customers’ attention only on the most important status updates, such as “Processing” or “Completed”.

add_filter( 'woocommerce_my_account_my_orders_query', 'ts_exclude_status',10,1 );
function ts_exclude_status( $args ) {
   $statuses = wc_get_order_statuses();
   unset( $statuses['wc-scheduled'] ); // wc-completed, wc-processing, etc.
   $args['status'] = array_keys( $statuses );
   return $args;
}

Output

I have created a custom order status such as ‘Scheduled’ and after implemeting the code, the status ‘Scheduled’ that appears on the status column along with the other available default/custom statuses will be hidden.

How to Hide Order Status Column from My Account > Orders Page? - Tyche Softwares

Alternatively, you can also set a filter so that customers can filter WooCommerce Order status in My Account Orders section.

Browse more in: Code Snippets, WooCommerce How Tos, WooCommerce Tutorials

Share It:

Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x