

Status tab showing role, this store ID, and inbound/outbound health timestamps.
Running multiple WooCommerce stores often creates the same operational problem: stock drift.
You update stock on one site, but another site still shows the old quantity. That can lead to oversells, customer frustration, and messy fulfilment.
Kitgenix Stock Sync for WooCommerce solves this with a secure, practical model:
This plugin is designed to be lightweight:
– No third-party SaaS.
– No custom database tables.
– Uses WooCommerce + WordPress primitives (REST API, options, product meta, transients, WooCommerce logging, Action Scheduler).
Stock state is synced per SKU, including:
– stock quantity
– stock status
– backorders
– low stock amount
Note: this plugin is focused on inventory syncing. It does not sync pricing, product content, images, or orders.
1) Stock changes are captured on each store using WooCommerce stock hooks.
2) Children send events to the Master; the Master applies incoming events locally and then pushes authoritative stock state out to all enabled children.
3) The Master can also run a Reconcile operation to push stock state for all products in batches.
This plugin supports SKU renames by maintaining an internal, stable identifier (a “GID”) stored as product meta:
– _kitgenix_stock_sync_for_woocommerce_gid
When SKUs change on the Master, the plugin emits a sku_rename event using the GID so child stores can map the update safely.
Tip: Run Reconcile on the Master after initial setup. Reconcile establishes stable GIDs for products that don’t already have one, which makes SKU rename sync reliable.
Child stores can optionally enable Strict checkout validation:
– During checkout, the child queries the Master’s stock for SKUs in the cart.
– If the Master reports the SKU is out of stock or insufficient (with backorders disabled), checkout is blocked.
– If the Master can’t be reached, validation is fail-open to avoid breaking checkout.
You can exclude SKUs (comma or new line separated). Excluded SKUs are ignored for:
– outbound stock events
– reconcile batches
– strict checkout validation
– audit checks
From the plugin admin screen:
– Test Connection (ping the configured store)
– Reconcile (Master): push authoritative stock state to all children in batches
– Manual SKU Sync (Master): push a specific set of SKUs to all children
– Audit Children (Master): query each child’s local stock fields and compare against the Master
– Event Log + Backlog: see recent events and failed pushes, and clear logs when needed
– Status: last inbound/outbound health timestamps and last error message
Text domain:
kitgenix-stock-sync-for-woocommerce
Option key:
– kitgenix_stock_sync_for_woocommerce_settings
Option schema (high-level):
– this_store_id, this_store_name, role, strict_checkout_validation
– master (child config): url, store_id, secret
– children (master config): entries with id, name, url, secret, enabled
– exclusions.skus
– Diagnostics/admin UI state: notices, event_log, backlog, reconcile, health
Product meta key:
– _kitgenix_stock_sync_for_woocommerce_gid
REST API routes (POST):
– /wp-json/kitgenix-stock-sync/v1/ping
– /wp-json/kitgenix-stock-sync/v1/event
– /wp-json/kitgenix-stock-sync/v1/stock (master only; used by strict checkout validation)
– /wp-json/kitgenix-stock-sync/v1/stock-state (used by audit)
Authentication headers:
– X-Kitgenix-Store-Id
– X-Kitgenix-Timestamp
– X-Kitgenix-Nonce
– X-Kitgenix-Signature
Signatures:
– HMAC SHA-256 over: timestamp + "\n" + nonce + "\n" + request_body
– Timestamp skew allowed: 5 minutes
– Nonce replay protection stored via transients
Action Scheduler hooks:
– (Action group: kitgenix-stock-sync)
– kitgenix_stock_sync_for_woocommerce_process_event
– kitgenix_stock_sync_for_woocommerce_push_to_store (async enqueue)
– kitgenix_stock_sync_for_woocommerce_retry_send_to_master
– kitgenix_stock_sync_for_woocommerce_retry_push_to_store
– kitgenix_stock_sync_for_woocommerce_reconcile_batch
Admin capability:
– manage_woocommerce
Admin nonces:
– kss_save_config
– kss_save_connection
– kss_save_children
– kss_test_connection
– kss_tools
– kss_logs
Filters:
– kitgenix_stock_sync_for_woocommerce_parent_menu_slug (change the parent menu slug; default: kitgenix)
Transients (dynamic keys):
– kitgenix_stock_sync_for_woocommerce_do_activation_redirect (30 seconds)
– kitgenix_stock_sync_for_woocommerce_kss_nonce_{md5(store_id|nonce)} (nonce replay protection, 10 minutes)
– kitgenix_stock_sync_for_woocommerce_kss_seen_{md5(event_id)} (duplicate event detection, ~2 hours)
– kitgenix_stock_sync_for_woocommerce_kss_debounce_{md5(key)} (debounce, ~2 seconds)
– kitgenix_stock_sync_for_woocommerce_kss_old_sku_{post_id} (SKU rename helper, 60 seconds)
– kitgenix_stock_sync_for_woocommerce_kss_audit_result_{user_id} (stores last audit result in wp-admin, 10 minutes)
Object cache (if persistent object cache is enabled):
– Cache group: kitgenix_stock_sync
– Key: kitgenix_stock_sync_for_woocommerce_kss_gid_{md5(gid)} (GID product ID lookup, ~1 hour)
Internal action hooks (called directly, but can be hooked):
– kitgenix_stock_sync_for_woocommerce_process_order_processing
This plugin includes a shared “Kitgenix hub” component in wp-admin which may fetch publicly available plugin metadata from WordPress.org using WordPress core’s plugins_api() function.
Caching:
– Transient: kitgenix_hub_wporg_active_installs_v1
– Transient: kitgenix_hub_wporg_ratings_v1
This plugin does not otherwise connect to third-party services as part of its stock sync. It does make REST requests between your own WordPress sites (Master and Child stores). These requests may include:
– product SKUs
– stock state (quantity/status/backorders/low stock)
Strict checkout validation on children sends SKUs in the cart to the Master for stock verification.
kitgenix_stock_sync_for_woocommerce_settings). Treat secrets like passwords.This plugin removes its settings and plugin-only transients on uninstall. It does not remove WooCommerce product meta or Action Scheduler records.
Removed on uninstall:
– Option: kitgenix_stock_sync_for_woocommerce_settings
– Site option: kitgenix_stock_sync_for_woocommerce_settings
– Transients by prefix: kitgenix_stock_sync_for_woocommerce_ and kss_ (covers dynamic keys such as nonce/seen/debounce helpers)
Multisite:
– Removes per-site options and transients for each site.
If you want to remove all plugin data, you can also delete:
– the product meta _kitgenix_stock_sync_for_woocommerce_gid (if you no longer need SKU rename mapping)
If this plugin saves you admin time or helps prevent oversells across multiple stores, you can support ongoing development here:
https://donate.stripe.com/9B65kDgG3fTQ2Kzcmwf7i00
Built with ❤︎ by @kitgenix – https://kitgenix.com