Search the site:

Home Blog How to add a new WooCommerce order status into Dashboard widget?

How to add a new WooCommerce order status into Dashboard widget?

WooCommerce has a widget that shows up on the admin dashboard named “WooCommerce status”.

WooCommerce Status Dashboard Widget

By default, the widget shows orders that have a status of “Processing” or “On hold”. It doesn’t show any other order statuses like “Completed” or “Refunded”, etc.

There is no setting provided in WooCommerce which would allow adding any other order status to this dashboard status widget. We will look at how to add a new WooCommerce order status to this widget.

This requirement can be achieved by using the woocommerce_after_dashboard_status_widget WooCommerce hook which will allow adding any additional information at the end of the dashboard WooCommerce status widget.

When below code snippet is included in the functions.php of the currently active child theme (or theme), the status widget will show a quick overview of the order statuses information of ‘Completed’ and ‘Refunded’ statuses as well.

When the above code is included, then the WooCommerce status widget will look like as below

Upon clicking on the respective order statuses, the page will be redirected to the WooCommerce Orders page where all the orders will be sorted based on the selected order status.

So, the store owner can add any WooCommerce order status for the quick view into dashboard WooCommerce status widget as per his requirement.

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

3
Leave a Reply

avatar
3 Comment threads
0 Thread replies
2 Followers
 
Most reacted comment
Hottest comment thread
3 Comment authors
Md. EliasBriRanjit Recent comment authors

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
newest oldest
Notify of
Ranjit
Guest

can we add total number of orders for the current month in dashboard

Bri
Guest
Bri

Brilliant snippet but I have a question. Is it possible to ignore hidden products? Here is the scenario, if you automatically add a free hidden product to the cart for every single order then the WooCommerce Dashboard Status widget will always show your best seller as the free product which basically masks the real best selling product.

Thanks in advance.

Md. Elias
Guest
Md. Elias

is there any way customer can change the order status processing to complete

from purchased

Subscribe Now