Linux 软件免费装
Banner图

Flash Sale Stock Guard for WooCommerce

开发者 developerakshat
更新时间 2026年9月4日 02:56
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

woocommerce stock management flash sale prevent overselling stock reservation

下载

1.0.0

详情介绍:

Overselling isn't just a flash-sale problem. Any product with more people watching it than units left — a restock, a handmade batch, a limited print run, a popular size running low — can sell the same last unit to two customers within seconds of each other. Flash Sale Stock Guard for WooCommerce closes that window for good: the instant a guarded product is added to cart, its stock is held against that shopper, so nobody else can check out with units that are already spoken for. If they don't complete checkout in time, the hold expires automatically and the stock goes back into circulation — no manual cleanup, no oversold orders to refund and apologize for. It's named for the moment it matters most, but it runs every day, on every guarded product — quietly protecting stock whether or not a sale is even happening. Stock holds like this are usually locked behind premium inventory or checkout add-ons. Here, that protection is built in and free from the moment you activate the plugin — no upsell, no "Pro" version required for concurrency-safe locking, per-variation targeting, order-status-aware release, or the developer filters below. How it works Choose what gets guarded Built for how customers actually shop For developers See the plugin's GitHub README for parameters and code examples for each hook.

安装:

  1. Make sure WooCommerce is installed and active — this plugin requires it.
  2. Upload the plugin files to /wp-content/plugins/flash-sale-stock-guard-for-woocommerce, or install it through the WordPress plugins screen directly.
  3. Activate the plugin through the 'Plugins' screen in WordPress.
  4. Go to WooCommerce → Stock Guard to choose which products are guarded, set the hold duration, turn the countdown on or off, and style the expiry pop-up.

屏幕截图:

  • The "Always guard this item" checkbox on a product's Inventory tab.
  • Live countdown shown on the cart page.
  • Live countdown shown on the checkout page.
  • The pop-up shown on the cart or checkout page when a reservation expires.

升级注意事项:

1.0.0 Initial release version.

常见问题:

How do I stop overselling on WooCommerce?

Overselling happens because WooCommerce only checks stock at checkout — two shoppers can add the last unit to their carts at the same time, and both are allowed to try to pay. Turn on Flash Sale Stock Guard for a product (or let the low-stock default catch it automatically), and stock is held the moment it's added to cart instead — so only one of those two shoppers can ever complete the order.

Is this only useful during flash sales?

No — that's just the scenario overselling happens fastest in. The same hold-on-add-to-cart protection runs every day for any product you guard, sale or no sale: low-stock items, one-off restocks, made-to-order or limited-run products, anything where two people could otherwise grab the same last unit.

Does this require WooCommerce?

Yes. It has no purpose without it, and won't do anything if WooCommerce isn't active.

What happens when a customer's hold expires?

The held quantity is released back to available stock automatically, and the item is removed from that shopper's cart. On the cart or checkout page the countdown turns into a pop-up telling them the reservation lapsed, with a button back to the shop. If the item is still in stock, adding it again starts a fresh hold.

Does this work with variable products?

Yes — holds are tracked per variation, not just per product.

Will this slow down my store?

No. Stock checks use a lightweight database lock scoped to the specific product being held, so shoppers buying different items never wait on each other.

Does the countdown work with the block-based Cart and Checkout?

Yes, alongside the classic shortcode-based versions.

Can I turn off the countdown but keep the stock protection?

Yes — the countdown display and the hold logic are controlled by separate settings.

Can I change how the expiry pop-up looks?

Yes. WooCommerce → Stock Guard → Expiry popup sets its background colour, text colour, button colours, and text size. The wording and the "back to shop" destination are fixed.

Will uninstalling the plugin delete my data?

Not by default. Your guard settings and per-product overrides stay in the database in case you reinstall. Data is only wiped if you tick "Delete data on uninstall" in the settings screen first.

更新日志:

1.0.0