Can you use WooCommerce plugins on multiple sites?

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 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.

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 metadata, 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.

Visit : Woocommerce Development.

Contributions, Comments & Kudos

Add new contribution

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Enter the characters shown in the image.