Linux 软件免费装
Banner图

Kitgenix Stock Sync for WooCommerce

开发者 kitgenix
更新时间 2026年9月1日 03:43
捐献地址: 去捐款
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv3 or later
版权网址: 版权信息

标签

woocommerce inventory sync backorders multistore stock sync

下载

1.0.0 1.0.1 1.0.2 2.0.0

详情介绍:

Kitgenix Stock Sync for WooCommerce synchronizes inventory between WooCommerce stores using a Master/Child architecture. The Master store acts as the authoritative inventory source while Child stores send stock-changing events back to the Master and receive the resulting authoritative stock state. The plugin is built for merchants who sell the same physical inventory through several WooCommerce storefronts and need stock quantity, stock status and backorder behaviour to converge without manually exporting/importing inventory files. Stores communicate directly over signed REST requests; there is no Kitgenix cloud stock relay. Background delivery uses WooCommerce Action Scheduler where available, with retries and backlog handling for temporary failures. Learn more about Kitgenix at Kitgenix. WooCommerce Stock Sync Features Master and Child Architecture The Master owns the authoritative stock state. A Child store can detect a local event that changes stock, send that event to the Master, and then receive the authoritative result that should be applied across the network. This avoids a simple "last store to save wins" design in which two storefronts can continually overwrite one another with stale quantities. The Master configuration stores the connected Child sites and the Child configuration stores the Master endpoint/credentials needed for signed communication. Inventory Fields Synchronized The state payload includes the stock-related fields needed to keep WooCommerce availability consistent, including quantity, status, backorders, low-stock amount and effective manage-stock state. Variable products/variations are handled with awareness that a variation may manage its own stock or inherit stock management from the parent product. The plugin focuses on stock. It is not a general product-catalogue synchronizer for descriptions, images, categories and full pricing; Kitgenix MultiStore Sync is a separate broader plugin for that use case. Automatic Capture of Stock Changes The sync engine hooks into WooCommerce product/variation stock updates, stock-status updates, updated product properties, order processing and stock restoration. This means stock changes made by normal WooCommerce operations can enter the sync pipeline without staff having to click a separate "export stock" button. Because third-party integrations such as POS or marketplace connectors often write stock through WooCommerce's normal APIs/hooks, their resulting WooCommerce stock changes can also be observed without the Kitgenix plugin calling the third party directly. Event Versioning and Duplicate Protection Each synchronized product carries plugin metadata used for global identity and event versioning. The receiver tracks the applied version so an older delayed event can be rejected instead of rolling stock backwards after a newer update has already been applied. Event IDs are also remembered for a limited period so a duplicated/retried delivery is not applied as though it were a brand-new inventory movement. Retry and Backlog Handling Outbound failures are classified and retried using increasing delays. Recoverable failures can be persisted in a capped backlog so administrators can see that inventory delivery is pending rather than assuming a silent request succeeded. Backlog entries can be retried or discarded from the administrative tools when appropriate. Successful later delivery removes the corresponding outstanding item. Reconciliation and Conflict Detection The Master can scan Child stores and compare their current stock state with the authoritative record. Reconciliation processes products in batches and can continue through Action Scheduler rather than requiring a single long-running browser request. Conflict reports can identify mismatched stock or duplicate-SKU conditions that need manual attention. The plugin also exposes audit/reconciliation functionality through WP-CLI. Strict Checkout Validation A Child store can optionally validate cart quantities against the Master during checkout. This is intended to reduce overselling when the local storefront's last synchronized value is older than the authoritative stock. Because the Master can be temporarily unreachable, the plugin includes configurable behaviour around failure and stale cached stock snapshots. Stores should choose a strategy that matches whether they prefer checkout availability or strict oversell prevention during network outages. SKU Rename Handling The plugin observes SKU metadata changes so identity can remain consistent when a product's SKU is edited. Global plugin IDs provide another stable identifier used by the sync process, reducing dependence on the assumption that a SKU can never change. Exclusions Administrators can exclude specific SKUs from stock synchronization. Excluded products are ignored by normal event delivery and reconciliation so local-only inventory is not continually overwritten. Secure Signed REST Requests Master and Child REST requests are signed using the shared-secret authentication layer. Requests include timing/identity information and are rejected when they are invalid, too large, outside the accepted window or fail replay/authentication checks. The security layer also contains throttling/temporary lockout behaviour for repeated authentication failures and remote URL validation. Shared secrets can be rotated with a configured overlap period so a network can move from an old secret to a new one without requiring every in-flight request to fail at the exact rotation second. Health Monitoring Scheduled health pings update the stored connection status for the Master/Child relationship. The admin interface and Site Health integration can report configuration, connectivity, backlog and Action Scheduler concerns. WP-CLI The command base is: wp kitgenix-stock-sync The command class includes status, audit/reconciliation, SKU-level actions, backlog/conflict tooling and formatting helpers for operational use from the command line. Direct Store-to-Store Data Flow Stock events and stock-state queries are sent only between the WooCommerce sites configured by the administrator. Kitgenix does not receive the store's inventory feed or act as a remote source of truth. The shared Kitgenix admin Hub can separately request public plugin metadata from WordPress.org, and the admin stylesheet imports Google Fonts as documented in External Services. Those requests do not contain WooCommerce stock payloads. Typical Uses

安装:

  1. Install via Plugins → Add New and search for "Kitgenix Stock Sync for WooCommerce", or upload the ZIP to /wp-content/plugins/.
  2. Activate the plugin (WooCommerce required – the plugin will deactivate itself if WooCommerce isn't active).
  3. Open the settings under the Kitgenix hub (Kitgenix → Stock Sync).
  4. Decide which store is the Master and which are Children, then configure the connection on each: Master/Child URLs must use HTTPS, plus a Store ID and a shared secret.
  5. Use Test Connection to confirm each pairing before relying on it.
  6. Run a Reconcile on the Master to establish stable GIDs and push the current stock state to every Child.
  7. Optional: enable Strict checkout validation on Child stores and choose a failure strategy.
  8. Optional: server administrators can also drive setup checks and operations via WP-CLI (wp kitgenix-stock-sync status) – see the developer reference below.
The plugin cannot sync anything until at least one Master and one Child are configured and connected – there is no default or automatic pairing.

屏幕截图:

  • Configuration tab: store name, Master/Child role, Strict checkout validation, the checkout failure strategy, last-known-stock max age, and excluded SKUs.
  • Stores tab on a Master store: the Add Child Store form plus a Configured Children table listing each child's enabled state, URL, store ID, and shared secret.
  • Tools tab: Test Connection, and the Master-only Reconcile (with scope, batch size, dry-run and differences-only options and last-run summary), Manual SKU Sync, and Audit Children panels.
  • Conflicts tab: a generated report of GID mismatches, missing products, and mismatched SKUs between Master and Child stores.
  • Logs tab: the Event Log with level, diagnostic code, message and context per entry, a diagnostic code reference table, and the Backlog of failed pushes awaiting retry.

升级注意事项:

2.0.0 Adds versioned stock state so delayed/duplicate/replayed events can't corrupt stock, a Conflict Dashboard, a redesigned admin UI, WP-CLI, Site Health, and WooCommerce 11.0 compatibility. Migration is additive and idempotent – nothing existing is lost.

常见问题:

What is stock drift?

Stock drift happens when you update stock on one WooCommerce store but another connected store still shows the old quantity. Left unresolved, it leads to oversells, customer frustration, and messy fulfilment. This plugin prevents stock drift by keeping one authoritative Master store's stock state in sync with all Child stores.

Does this require WooCommerce?

Yes. This plugin hooks WooCommerce product stock APIs and requires WooCommerce to be active.

How often does stock sync run?

There is no fixed interval or polling schedule. Stock changes are captured and sent the moment WooCommerce itself changes stock, dispatched asynchronously via Action Scheduler – typically within seconds. A separate recurring health-check ping runs roughly every 15 minutes purely to keep connection status current, not to sync stock.

What format does the feed or import file need to be?

There is no feed file or CSV import involved in the sync itself. This plugin does not read a feed URL or file – it connects directly, over authenticated REST API calls, to the other WooCommerce store(s) you configure as Master or Child. If you separately import stock into WooCommerce via CSV, that import triggers WooCommerce's own stock-update hooks, which this plugin then syncs like any other stock change.

Can I sync from multiple sources?

This plugin uses a single-Master, multiple-Child model: one authoritative Master store can push stock to any number of Child stores, but only one store may act as Master at a time. It does not support pulling stock from multiple independent Master sources into one store.

How do I set up Master and Child stores?

Install and activate the plugin on the Master store and every Child store, then choose a role for each: one store as Master, all others as Child. On each Child, enter the Master's connection details (HTTPS URL, Master Store ID, and Shared Secret); on the Master, add each Child the same way. Use Test Connection to verify the link, then run Reconcile on the Master to establish stable GIDs and push the initial stock state. See Quick Start above for the full walkthrough.

Can I use more than one Master store?

No. This plugin is designed for a single authoritative Master store and one or more children.

Does it sync product data (title, price, images) or orders?

No. It syncs stock state only.

What stock fields are synced?

Per SKU: stock quantity, stock status, backorders, and low stock amount.

Is stock sync automatic, or do I need to trigger it manually?

Sync is automatic. Stock changes are captured the moment WooCommerce itself changes stock (an order, a refund, a CSV import, a REST edit, or a third-party integration) and dispatched asynchronously through Action Scheduler – there's no schedule to configure and no file to upload. Manual tools (Reconcile, Manual SKU Sync) exist for initial setup and troubleshooting, not for day-to-day operation.

Does this plugin support variable products and variations?

Yes. Variations are synced by their own variation SKU, including variations that inherit stock management from their parent product.

Are any product types excluded?

External/Affiliate and Grouped products are skipped for stock syncing (these types are not stock-managed in WooCommerce).

Does this plugin work with WooCommerce High-Performance Order Storage (HPOS)?

Yes. The plugin declares compatibility with WooCommerce's custom order tables (HPOS) feature.

What happens if a child store is offline?

Failed pushes are recorded in the Backlog (with reason, attempt count, and next retry time) and retried automatically using WooCommerce's Action Scheduler with an increasing delay, up to a bounded number of attempts. Once that budget is exhausted, the item is marked for manual attention – it will not retry forever – and can be retried or discarded (with confirmation) from the Logs tab or WP-CLI.

What happens if the Master is unreachable during checkout validation?

Depends on the configured failure strategy (Configuration tab): fail-open (default, allows checkout), fail-closed (blocks checkout), or use last-known stock (applies a recent cached snapshot if it's fresh enough, otherwise falls back to fail-open). A definitive out-of-stock/insufficient response from a reachable Master always blocks checkout, regardless of this setting.

Where can I view the sync logs?

  • WooCommerce → Status → Logs (source: kitgenix-stock-sync-for-woocommerce)
  • Kitgenix → Stock Sync → Logs tab (Event Log + Backlog)

How do I exclude specific SKUs from syncing?

Add SKUs in Configuration → Exclusions. Excluded SKUs are ignored across all sync and tooling paths.

Can a delayed, duplicated, or retried event corrupt my stock?

No. Every authoritative item the Master sends carries a monotonically increasing per-product version number. A receiving store records the last version it applied and ignores anything that arrives with an equal or older version – so a delayed event, a retried send, or a replayed request can never overwrite already-current stock, regardless of delivery order. This is in addition to (not instead of) transport-level duplicate detection via each event's unique ID.

How does this plugin handle WooCommerce 11.0's failed-order stock restoration?

WooCommerce 11.0 now restores previously-reduced stock when an order moves to failed (not just cancelled/pending), guarded by WooCommerce's own "was stock actually reduced for this order" flag so it never double-adjusts. This plugin does not reimplement that arithmetic – it reads the resulting WooCommerce stock state after WooCommerce has made the change and synchronises that, so the 11.0 behaviour change is handled automatically with no plugin-specific logic required.

Does this work with WooCommerce Square?

Yes. When Square changes a product's stock on a WooCommerce store, it does so through WooCommerce's own stock-update APIs, which this plugin already listens to – no Square-specific code is needed. If that store is the Master, the change propagates to all Children. If it's a Child, the change is sent to the Master, which rebuilds the authoritative state and fans it out to every other Child (not back to the one that sent it), which is what prevents a feedback loop.

Can I rotate a shared secret without breaking sync?

Yes. Use "Rotate Secret" on the Stores tab (this is an admin-UI action; there is no WP-CLI equivalent). The old secret keeps working for a short overlap window (default 24 hours, filterable) so you can update the other store before it expires.

Does this plugin support WP-CLI?

Yes – see the developer reference above for the full command list (wp kitgenix-stock-sync status|audit|reconcile|sku|backlog|conflicts).

Does this add any WordPress Site Health checks?

Yes. Site Health → Status includes checks for role/connection configuration, connection health, backlog items needing attention, and Action Scheduler availability. Site Health → Info includes a non-secret diagnostic section (role, store ID, counts, timestamps) – shared secrets and store URLs' credentials are never included.

Does this plugin connect to any third-party services?

It connects directly between your own WordPress/WooCommerce sites over authenticated REST requests – no third-party sync service is involved. The only outside call is an optional, admin-only lookup of public WordPress.org plugin metadata (install counts, ratings, artwork) for the "Kitgenix hub" screen; see External Services above for full details.

更新日志:

2.0.0 (31 August 2026)