Product inventory

Simple Inventory Sync

This WooCommerce stock synchronisation plugin allows you to sync the stock quantity of the products (and variations) with the same SKU between different stores.

Multiple Products from the Same Stock

In this tutorial I will show you how you make both Stock Quantity and Stock Status to be automatically shared between different products on your WooCommerce store. But if you come to this tutorial looking for a product inventory synchronisation tool between different WooCommerce stores, then please take a look at my plugin.

Also I am going to show you an example with variations of the same product.

The whole idea is pretty simple and can be breaked down into two steps:

  1. Creating a custom function connected either to the woocommerce_product_set_stock or to the woocommerce_variation_set_stock action hook if we talking about variations.
  2. Obtaining the connected products and to setting the same stock values for them.

Easy peasy.

Updating Product Stock Programmatically

Since I’ve been working a lot lately with synchronising product stock quantities between multiple WooCommerce stores or within a WordPress Multisite network, I can share with you some interesting insights how it is working.

Get Product Stock Quantity

In this tutorial I will not only show you how to get stock quantity in WooCommerce (of a product or a product variation by the way) but we will also display it on the shop page. Like this:

displaying only one left in stock on WooCommerce shop page