Clearly users do not have an idea of WordPress multisite. They think a plugin which works on a single site will work on multisite just as well. Or even better! It will work according to their requirements, whereby some functionality is unique to each site, and a part of the functionality is shared across the network. Phbbbt!
It does NOT miraculously work that way. Not, unless already stated by the plugin, or without any customization. WooCommerce is an example. It works on WordPress multisite. But the functionality that users could expect, might not be available by default. And that is perfectly fine.
What is important, is that, you are aware of how WooCommerce works on a WordPress multisite setup. This can help you set a realistic cap on your expectations.
What happens when you Install WooCommerce on a Multisite?
WooCommerce is multisite compatible. This means, when you install and activate the WooCommerce plugin, it will be activated on all sites, and there will be an option to create a store, set up products for each site on the multisite. Individually. Each store will be independent of the other.
So, say I have 3 sites in a multisite- Blue, Orange and Purple (with Purple being the main site). When I install and activate WooCommerce on Purple, it will be activated on Blue and Orange as well. When I add products on Purple, or update some settings the changes will not be reflected on Blue or Orange, by default.
Adding products across all sites might be tricky, but there is an option to update WooCommerce settings across all sites.
How to update WooCommerce settings updated across all sites?
To update the plugin’s settings across all sites in the network, you can make use of the YD Network-wide options. This plugin adds a new settings page, using which you can choose the blog or plugin settings you want the settings replicated. The changes have to be made from your main site.
With that settled, let’s talk about customers.
What Happens when a User Account is Created?
In WordPress multisite, the users are shared. Specifically, the WordPress User table is shared. But this wouldn’t mean a user can access all sites with a single login. This can be made possible only, if you grant a user the access to other sites.
For example, say a user registers on Orange as a WooCommerce store customer. The user will be created as a usual WordPress user, but will have the permission to login only in Orange’s WooCommerce store. But this user won’t have login access to Purple and Blue, even if I would need it to function this way. There would be some code involved.
But, since the user table is shared, my job becomes simpler. Each time a user is created, I have to register on the user registered hook (user_register), and grant permissions to access other sites (Purple and Blue). The login credentials will be the same, and once the user will login into one site, he will be logged in across all sites.
You can do this with a plugin as well. The Multisite User Management plugin, boasts of providing the exact functionality.
Next, let’s talk about products.
What Happens when a Product is Added in WooCommerce?
When a WooCommerce product is created, it is added only to a particular site. The site it is created on. For example, if I create a product on Purple, it will be added only to Purple’s store. Like users which are shared across all sites, products cannot be shared. However, products can be replicated.
For this, we have to use the WooCommerce API (with version 2.1 or higher), which will make our task simpler rather than creating a custom post, to then copy details and meta data, adding images and taxonomies.
You have to ensure that whenever a product is updated, the changes are accordingly reflected as well. To make things simpler, you could use the main site to add or update products.
[space]
Can Orders be Aggregated on the main Site?
For every purchase made, an order is created. Several WooCommerce users, want an aggregated view of customer orders. This could be, because all sites are managed by the same admin. If you’re dead sure that WooCommerce multisite suits your requirements, the optimal option you have here, is to use an external order management system, to manage all orders in a single place.
The reason for this is that managing orders on a single site could be tricky. To start with all products will HAVE to be replicated across all sites. Because orders will have to be maintained on a single site. Since orders are added to a customer’s account, any changes made there, have to reflect in the aggregated order view.
Pssst.. As for the WooCommerce multisite cart? I’ve spoken a lot about it before. So I won’t be covering it all over again here.
There are very many points I can cover here. But it’ll be a lot to take in for just one article. Because any changes which have to be made would depend on your requirement. By no means is WooCommerce supposed to provide you the above-stated functionality, just because a majority of you might have a similar need. The plugin does not claim to provide this, but there are ways to work with it (or around it), to make it work according to your requirements. If you have any questions for me, do feel free to leave your comments in the comment section below.
Further Reading: