WooCommerce Network Orders Dashboard Widget

Today I am going to talk about a very interesting widget in WooCommerce which is available to you only when you’re using WooCommerce within a WordPress Multisite network:

WooCommerce network orders dashboard widget

This widget appears in two places:

In order for this widget to appear, WooCommerce has to be either network activated or activated for the main site of your network.

Let’s take a look how this widget really works.

wc/v3/orders/network – there is no magic in it

When I started developing my order synchronisation plugin for WordPress Multisite, I first found out about this widget and that it works based on the wc/v3/orders/network REST API endpoint. Could you imaging my disappointment when a lot of plugin code had already been written but there was possibly an official WooCommerce way to get all orders across the multisite network using that endpoint? But when I started to look into the WooCommerce core files, I stopped worrying about it very quickly.

So, basically how it works, it just gets all sites a current user is added to with the help of the get_blogs_of_user() function, then it sends REST API requests to wc/v3/orders/network in a loop for each site in order to get the latest orders, and the last but not least it sorts orders by date with JavaScript.

Not sure about you, but I have questions to this behaviour. For example if there are hundreds of sub-sites within your multisite network, what happens with this widget in that case? Because every time we refresh our Network Dashboard page, it is going to send hundreds of REST API requests in a loop (asynchronously, yes, but anyway).

It means that the whole idea of syncing orders to a single WooCommerce store in order to manage them there still takes a place and that’s what my plugin does.

Why and How to Remove Network Orders Dashboard Widget?

Now, once you have figured out how this widget works, maybe you would like to remove it from your site dashboard.

I can say there are possibly two reasons for that:

  1. The more sites you have in your network, the more REST API requests the widget is going to send, which may affect your multisite performance.
  2. The widget also comes with two files – network-order-widget.css and network-orders.js, which are going to be included into your dashboard pages.

If you compare these two reasons to a practical usage of the widget, maybe you would decide to remove it. Anyway, here is how to do it.

In order to remove a network dashboard widget we need to use the remove_meta_box() function inside the wp_network_dashboard_setup hook.

add_action( 'wp_network_dashboard_setup', function() {

	remove_meta_box( 'woocommerce_network_orders', 'dashboard-network', 'core' );

} );

For a regular dashboard widget (which is in a main site of your network).

add_action( 'wp_dashboard_setup', function(){

	remove_meta_box( 'woocommerce_network_orders', 'dashboard', 'core' );

} );

In case you don’t know where to use the code.

My Order Sync Plugin as an Alternative Solution

I already mentioned before, that I started figuring out how “WooCommerce Network Orders” widget works when I was developing my Multisite Order Sync plugin for WooCommerce.

And yes, in case you’re using my plugin, you shouldn’t be worried about this widget performance at all, because the plugin automatically removes the default widget and replaces it with its own one, which looks exactly the same, but doesn’t send tons of REST API requests (just a single usage of wc_get_orders() function and that’s all) and doesn’t include an extra JavaScript file into your admin dashboard.

Here we go:

Dashboard widget with synced WooCommerce orders
Yes, it is completely the same but uses PHP and works faster.

Maybe it is not a very practical post, but it took some time for me to figure out how this widget works, so I just decided to share my experience with you here 🙃

Misha Rudrastyh

Misha Rudrastyh

Hey guys and welcome to my website. For more than 10 years I've been doing my best to share with you some superb WordPress guides and tips for free.

Need some developer help? Contact me

Follow me on X