---
site_name: Toret dokumentace
site_url: https://documentation.toret.cz
contact_email: info@toret.cz

title: Toret Sync Stock Plugin Documentation
url: https://documentation.toret.cz/en/toret-sync-stock-plugin-documentation/
date: 2026-07-22
modified: 2026-07-27
author: bara@toret.cz
type: page
---

# Toret Sync Stock Plugin Documentation

You are currently on the documentation pages for the Sync Stock plugin, which allows you to synchronize product inventory between WooCommerce e-shops. You can purchase the Sync Stock plugin here: [Toret Sync Stock](https://toret.cz/produkt/synchronizace-skladu/).

Table Of Contents

1. How the plugin works
2. Requirements
3. Plugin Installation
4. Plugin Activation
5. Settings (General tab)
 - Role
 -
 - Product Matching
 -
 - Stock Sync Log
6. Connecting Stores (Connection tab)
 - On the store with the Master role
 -
 - On the store with the Spoke role
7. Initial stock sync on a new Spoke (Tools tab)
8. Standard Operation
 - "Master unavailable" alert
9. Manual actions on the product detail page
10. Tools
11. Status and log
 - Complete log
12. Diagnostics
13. Troubleshooting
 - WP-CLI
14. Plugin testing

## How the plugin works

The Toret Sync Stock plugin keeps your inventory synced across multiple WooCommerce e-shops. Any change in stock on any connected store — whether it’s a sale, cancellation, return, restocking, manual adjustment, or bulk import — updates on all other stores within seconds.

The plugin operates in a Master/Spoke topology:

Master — one “main” store that holds the authoritative (canonical) stock level and broadcasts changes to all others.

---

Spoke — every other store. It reports its changes to the Master and receives the current values from it.

---

Products are matched across stores based on their SKU, or optionally by EAN/GTIN or a custom meta key. Products without a matching value are not synchronized.

## Requirements

| Included | Minimum version |
| --- | --- |
| WordPress | 6.0 |
| WooCommerce | 6.7 |
| PHP | 8.1 |
| My SQL | 5.0 |

All stores must run on HTTPS — communication via unsecured HTTP is rejected.

## Plugin Installation

After purchasing the plugin, you will receive an email with a license key and a link to download the plugin’s zip file. Detailed instructions on how to install a plugin in WordPress from your computer can be found here. [zde](https://documentation.toret.cz/instalace-pluginu/).

**Important!** The plugin must be installed, activated, and configured on all stores where you want to synchronize stock.

## Plugin Activation

After installing the plugin, open the Sync Stock plugin, enter your license key into the appropriate field, and click the button to verify the license.

![Toret Synchronizace skladu - aktivace pluginu](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-aktivace-pluginu-1024x410.png "Toret Synchronizace skladu - aktivace pluginu")

## Settings (General tab)

(Toret Plugins > Sync Stock > General)

![Toret Synchronizace skladu - obecné nastavení](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-obecne-nastaveni-1024x504.png "Toret Synchronizace skladu - obecné nastavení")

### Role

Select store role:

Master — holds the authoritative stock and broadcasts changes. There can be only one Master in the entire network.

---

Spoke — connects to the Master. The number of Spoke stores is unlimited.

---

### Product Matching

Products are matched based on the selected matching key. This setting must be configured identically across all stores. Stock levels will only sync between products that share the exact same value (e.g., the same SKU).

**Primary matching key** — the main key used to match products across stores:

- SKU (default)
- EAN / GTIN — native WooCommerce field „GTIN, UPC, EAN or ISBN” (WC 9.2+)
- Custom meta key — any custom product meta key

**Custom meta key** — the name of the meta key for the option above. It can also serve as a backup key if the primary key is set to SKU or EAN/GTIN.

**Strict matching** — if enabled, only the primary key is used. If disabled, other keys are tried as a backup if the value is missing or not found.

Important: Configure the matching settings identically on all stores; otherwise, products may fail to match.

### Stock Sync Log

**Log retention (days)** — the number of days to keep records in the synchronization log (default is 14). Older entries are automatically deleted once a day.

## Connecting Stores (Connection tab)

(Toret Plugins > Sync Stock > Connection)

### On the store with the Master role

1. Open the Connection tab.
2. Click Generate pairing token (a). A one-time pairing token valid for 1 hour (b) will be generated,
3. The token, along with the Master URL, must be entered on the store(s) with the Spoke role (see below) within 1 hour.

On the same tab, you will see the Connected stores table (c). This lists all connected stores along with their pending changes queue, the last sync time, and action buttons: Test (to verify the connection) and Remove (to disconnect the store).

![Toret Synchronizace skladu - připojení e-shopů](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-pripojeni-e-shopu-1024x421.png "Toret Synchronizace skladu - připojení e-shopů")

> TIP: You need to generate a unique token for each Spoke store.

### On the store with the Spoke role

1. Open the Connection tab.
2. Enter the Master URL (e.g., https://hlavni-eshop.cz) and paste the Pairing token from the Master store.
3. Click Pair with Master.

Once paired, the connection status will be displayed along with the Test connection and Disconnect buttons. The token is single-use and will expire after a successful pairing; to connect another store, you must generate a new token on the Master store.

![Toret Synchronizace skladu pripojeni e shopu 2 e1783664941369 1024x286](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-pripojeni-e-shopu-2-e1783664941369-1024x286.png "Toret Synchronizace skladu pripojeni e shopu 2 e1783664941369 1024x286")

## Initial stock sync on a new Spoke (Tools tab)

(Toret Plugins > Sync Stock > Tools)

![Toret Synchronizace skladu nastroje spoke e1783664893692 1024x249](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-nastroje-spoke-e1783664893692-1024x249.png "Toret Synchronizace skladu nastroje spoke e1783664893692 1024x249")

After connecting a new Spoke store, download the complete stock data from the Master:

On the Spoke store, go to Tools → Download full stock from the Master.

> TIP: If you click Preview differences (dry-run) first, a table of products with stock levels differing from the Master (what would be overwritten) will be displayed. No changes are made during this process.

The download runs in the background in batches, so even a large catalog won’t cause a timeout. You can see the progress (processed / total / updated) by refreshing the page. If the download is interrupted due to an unavailable Master, a notification will appear—check your connection and restart the download.

## Standard Operation

Once configured, the synchronization runs automatically:

Sales, cancellations, returns, stock additions, manual edits, quick/bulk updates, and CSV imports are all captured and distributed. Changes typically take effect within a few seconds, or at most within one minute (the queue safety interval).

---

Changes are queued—if the receiving store is temporarily unavailable, nothing is lost. The queue will repeatedly attempt delivery at increasing intervals (for roughly two days in total).

---

Additionally, the Spoke performs a reconciliation roughly every 5 minutes—comparing itself with the Master and adjusting any discrepancies.

---

For products without stock management, the stock status (in stock / out of stock / on backorder) is synchronized.

---

Decimal stock quantities are supported.

---

### “Master unavailable” alert

If the Master does not respond, a persistent warning displaying the downtime duration will appear in the Spoke admin area. Meanwhile, stock changes are queued and will be delivered once the connection is restored.

## Manual actions on the product detail page

In the product details, you will find the Stock Sync History metabox:

Change log — the last 10 synchronized changes: when, from/to stock levels, the reason (sale / return / manual edit / cancellation / reconciliation…), the source (this store including the order or user, Spoke name, or Master), and the version.

---

On the Master: The Broadcast current stock to all stores button sends the product’s current stock level as a new binding value to all connected stores.

---

On the Spoke: The Preview differences button (compares stock with the Master without making changes) and the Refresh stock from the Master button (downloads and applies the current value from the Master).

---

For variable products, these actions also apply to all of their variations.

![Toret Synchronizace skladu - historie synchronizace v detailu produktu - master](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-historie-synchronizace-v-detailu-produktu-master-1024x424.png "Toret Synchronizace skladu - historie synchronizace v detailu produktu - master")Historie synchronizace v detailu produktu – Spoke![Toret Synchronizace skladu - historie synchronizace v detailu produktu - spoke](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-historie-synchronizace-v-detailu-produktu-spoke-1024x392.png "Toret Synchronizace skladu - historie synchronizace v detailu produktu - spoke")Historie synchronizace v detailu produktu – Master

## Tools

(Toret plugins > Stock Sync > Tools)

**On the store with the Master role**

![Toret Synchronizace skladu - nástroje - master](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-nastroje-master-1-1024x374.png "Toret Synchronizace skladu - nástroje - master")

**Full synchronization** — redistributes the entire authoritative stock to all connected stores again. Use this, for example, after a prolonged outage. Up-to-date stores will automatically discard outdated values, while lagging ones will be synchronized.

**Master restored from backup / re-initialize** — only after restoring the Master from a backup. It increases the so-called epoch and broadcasts the restored state as the new authoritative state. **⚠ Warning, this function is destructive:**it will overwrite sales on Spoke e-shops even if they are newer than the backup. If you need them, record the current states on the Spoke beforehand.

**On the store with the Spoke role**

**Preview differences** (dry-run) and **Download full stock from the Master** — see the chapter on initial inventory population.

## Status and log

(Toret Plugins > Sync Stock > Status and Log)

On the Status and Log tab, you can check how the plugin is working.

In the Status box, you will find:

- Tracked SKUs— number of tracked items.
- Queue depth— number of changes waiting in the queue to be sent.
- Last successful send— time of the last successful send.
- Permanent failures (retry exhausted) — number of changes for which all delivery attempts have been exhausted.
- Permanent failures (retry exhausted)— number of changes for which all delivery attempts have been exhausted. If the Permanent failures field is non-zero, a warning is displayed: The affected items were automatically marked for re-synchronization with the Master, but the undelivered stock deduction may have been lost — there is a risk of overselling. Review the log and manually verify the item states. The counter can be reset using the Resetbutton.

Below is a preview of the last 20 log entries and a link to the full log (Latest Entries box).

![Toret Synchronizace skladu - Stav a log](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-Stav-a-log-1024x519.png "Toret Synchronizace skladu - Stav a log")

### Complete log

(Toret Plugins → Sync Stock Log)

Complete history of all synchronized changes with a filter by SKU or product ID, pagination, and expandable details for each record (by clicking on the row).

Color coding: green = success, blue = information/skipped, red = error.

The “Clear all logs” button permanently deletes the entire log.

![Toret Synchronizace skladu - Kompletní log](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-Kompletni-log-1024x417.png "Toret Synchronizace skladu - Kompletní log")

## Diagnostics

(Toret Plugins > Sync Stock > Diagnostics)

In the Diagnostics tab, you can check the e-shop for any problematic items:

**Products without a pairing value** — these are not synchronized; add an SKU/EAN/meta value to them.

**Duplicate pairing values**— multiple products share the same value, making the pairing ambiguous; remove the duplicates.

![Toret Synchronizace skladu - Diagnostika](https://documentation.toret.cz/wp-content/uploads/2026/07/Toret-Synchronizace-skladu-Diagnostika-1024x307.png "Toret Synchronizace skladu - Diagnostika")

> TIP: Diagnostics only checks for missing/duplicate values based on the primary matching key – a product that only has a value in the fallback key may show up there as “no matching value,” even though it’s actually being synchronized.

## Troubleshooting

| Problem | Solution |
| --- | --- |
| Pairing failed (Párování selhalo) | Check the Master URL (HTTPS!), the validity of the token (1 hour, single-use), and that the Master has the Master role. |
| Product is not synchronizing | Check that the product has a pairing value (Diagnostics tab) and that it also exists with the same value on the other side. |
| Stock levels “fluctuates” / do not match | Check the log for change details — for each change, you can see where it came from and why. |
| Warning about unavailable Master | Verify Master availability (click the Test connection button). The queue will deliver the changes once the connection is restored. |
| Permanent failures > 0 | Check the log, manually verify the stock of the affected SKUs (over-selling risk), and reset the counter. |
| Test environment without HTTPS | For development, HTTPS can only be enabled by a developer intervention (via the toret_sync_allow_insecure filter). |

### WP-CLI

```
wp tsync status # role, tracked SKU count, queue depth, last send, peers
wp tsync sync # Master: full broadcast; Spoke: reconciliation
wp tsync pull # Spoke: synchronous download of the full stock from the Master
wp tsync reconcile # Spoke: one reconciliation pass
wp tsync reinit # Master: re-initialization after restoring from backup
```

## Plugin testing

For testing purposes, you can use:

- the subdomain “dev.domainlicense” (with the same license as for the production website)
- localhost (127.0.0.1)

Purchased plugins will also work in these locations, and you can test their implementation and compatibility here before deploying them to the website and during its use.