[WordPress] 外掛分享: Kitgenix Stock Sync for WooCommerce

首頁外掛目錄 › Kitgenix Stock Sync for WooCommerce
WordPress 外掛 Kitgenix Stock Sync for WooCommerce 的封面圖片
全新外掛
安裝啟用
尚無評分
24 天前
最後更新
問題解決
WordPress 6.0+ PHP 8.1+ v1.0.2 上架:2026-02-13

內容簡介

Kitgenix Stock Sync for WooCommerce 是一款專為多個 WooCommerce 商店設計的外掛,旨在解決庫存不同步的問題。透過安全的 REST API 通訊,確保主商店的庫存狀態能即時更新至所有子商店,避免超賣及顧客不滿的情況發生。

【主要功能】
• 主商店與子商店之間的庫存同步
• 支援庫存數量、狀態及預購設定的同步
• 內部穩定識別碼(GID)維護 SKU 變更
• 支援批次推送庫存狀態的對帳操作
• 可選擇啟用嚴格結帳驗證功能

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Kitgenix Stock Sync for WooCommerce」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

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:

One Master store holds the authoritative stock state.
One or more Child stores receive updates from the Master.
Stores communicate over signed REST requests (HMAC SHA-256) with timestamp + nonce replay protection.

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).
What this plugin syncs
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.
How it works (high level)
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.
SKU rename sync (important)
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.
Strict checkout validation (Child)
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.
Exclusions
You can exclude SKUs (comma or new line separated). Excluded SKUs are ignored for:
– outbound stock events
– reconcile batches
– strict checkout validation
– audit checks
Tools & diagnostics included
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
Quick Start

Install and activate the plugin on the Master and all Child stores.
Choose your role on each store:

Master: one store
Child: all other stores

On the Child store: set the Master connection (Master URL, Master Store ID, Shared Secret).
On the Master store: add each child (Child URL, Child Store ID, Shared Secret).
Use Tools → Test Connection.
On the Master store: run Tools → Reconcile to establish stable GIDs and push initial state.
Optionally enable Strict checkout validation on children.

Developers
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
External Services
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.
Security & Privacy

No tracking cookies are added by this plugin.
Admin actions are protected with nonces and capability checks.
REST requests are authenticated using HMAC signatures with timestamp + nonce replay protection.
Shared secrets are stored in the plugin settings option (kitgenix_stock_sync_for_woocommerce_settings). Treat secrets like passwords.

Uninstall
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)
Support Development
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
Credits
Built with ❤︎ by @kitgenix – https://kitgenix.com

延伸相關外掛

文章
Filter
Apply Filters
Mastodon