=== Multi-Store Sync ===
Contributors: wppool, devsabbirahmed
Tags:  multi store, multi site, google sheet, stock sync, inventory management
Requires at least: 5.4
Tested up to: 7.0
Requires PHP: 5.6
Stable tag: 1.0.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Connect multiple WooCommerce stores and keep inventory in sync using Google Sheets

== Description ==

Running multiple WooCommerce stores (brands, branches, wholesale + retail, country-specific sites, etc) is great until inventory goes out of sync.

If you run more than one store, you often end up with:

* multiple admin dashboards
* multiple spreadsheets
* stock mismatches and overselling risk

**Multi-Store Sync Addon for FlexStock** extends the main [FlexStock](https://wordpress.org/plugins/stock-sync-with-google-sheet-for-woocommerce/) plugin, so you can now **connect multiple WooCommerce stores** and **keep stock aligned using Google Sheets**.

👉 FlexStock already helps you to manage WooCommerce products and stock from Google Sheets with real-time and two-way syncing. This addon adds what multi-store owners need next: **store connections + cross-store stock consistency**.



== External Services ==

This plugin utilizes external services to function:

1. **Connected WooCommerce Stores (REST API)**
   - **Service**: Communication between your connected WordPress/WooCommerce websites.
   - **Usage**: To synchronize product inventory, pricing, and other data between stores.
   - **Data Sent**: Product details (ID, SKU, Stock, Price, Title, etc.) and authentication tokens.
   - **Privacy Policy**: Data is transmitted directly between the sites you manually connect. No data is sent to any third-party servers outside of your own connected store network.



== Two common ways you can use it: ==

1️⃣ **Multiple stores, different catalogs (multi-brand / multiple businesses):**
If you run several WooCommerce stores where each site sells different products (different brands, different categories, or separate businesses), inventory management usually becomes scattered.

Most store owners end up maintaining:

* separate WooCommerce dashboards, and
* separate Google Sheets for each store

**🎯 What this addon solves:**
*Multi-Store Sync* lets you connect those stores so you can manage your inventory workflow from a single Google Sheets workspace (powered by FlexStock).

That means:

* Less repetitive work (no more updating the same type of stock data across multiple places)
* Easier inventory tracking across multiple WooCommerce stores
* A cleaner workflow for teams managing many stores

2️⃣ **Multiple stores that sell the same products (shared products across sites)**
Some businesses operate more than one WooCommerce site, but many or few of the products are the same across those sites. For example:

* a main storefront + regional storefronts
* retail + wholesale storefronts
* a primary brand store + sub-brand storefronts under the same company

In these setups, the same product may appear on multiple websites, so stock needs to stay accurate everywhere.

**🎯 What this addon solves:**
When the same product exists on more than one connected store, stock changes should not drift apart.

*Multi-Store Sync* helps keep stock consistent across connected stores where that product exists. So when stock changes in one store (after a purchase, restock, or an update via your workflow), the updated stock can be reflected on other connected stores too.

**Simple example (easy to visualize):**

* A product is listed on two stores with the same SKU.
* Let the total stock is 100.
* If 3 units are sold on Store B, stock becomes 97.
* Store A can also reflect 97, so both stores show the same available quantity.

This helps reduce overselling and keeps inventory counts consistent across your WooCommerce network.

> Best practice: Use the same SKU for the same product on every connected store. This is the most reliable way to match products and sync stock accurately.

== This Addon is perfect for ==
* **Multi-brand businesses** running separate WooCommerce stores with different catalogs
* **Agencies** managing inventory for multiple WooCommerce client sites
* **Retail + wholesale setups** where the same products must stay aligned
* **Regional / country storefronts** where stock must remain consistent across sites
* **Companies with multiple storefronts** (main store + sub-brand or storefront sites) selling overlapping products


==🧩 Key Features ==

* **Connect multiple WooCommerce stores:**
Link your stores inside FlexStock Addon and manage syncing from one place.

* **Centralized workflow with Google Sheets:**
Keep your inventory workflow in Google Sheets (single tab or store-wise tabs).

* **Flexible sync direction:**
Choose how stock updates should flow based on your operations.

* **Built for shared-stock scenarios:**
When products overlap across stores, keep stock aligned across those stores.

* **Non-technical setup:**
Connect stores using store URL + authentication token/keys.


== Installation ==

1.  Upload the `multi-store-sync-addon-for-flexstock` folder to the `/wp-content/plugins/` directory.
2.  Activate the plugin through the 'Plugins' menu in WordPress.
3.  Ensure that the main FlexStock plugin is also installed and activated.
4.  Navigate to the "Multi-Store Sync" settings page to configure the parent-child store connections.

== Frequently Asked Questions ==

= Do I need the main FlexStock plugin for this addon to work? =

Yes, this is an addon for the FlexStock plugin. You must have the main plugin installed and activated for this addon to function correctly.

= How do I connect my stores? =

You can connect your stores by navigating to the "Multi-Store Sync" settings page. From there, you can add child stores to a parent store by providing the site URL and an authentication token.

= Can I sync stock from a child store to a parent store? =

Yes, the plugin supports two-way synchronization. You can sync stock from a parent store to a child store, or from a child store to a parent store.


== Changelog ==

= 1.0.0 =
* Initial release.