Install, check the form on a sold out product, edit the email and restock. This guide covers the settings, double opt-in and consent, what happens when stock returns, the Subscribers and Most wanted tabs, My Account, the developer hooks and what to check when something does not look right.
Upload demfilz-back-in-stock-notifications-for-woocommerce.zip under Plugins → Add New Plugin → Upload Plugin and activate it. WooCommerce must be installed and active (WooCommerce 8.0 or later, WordPress 6.2 or later, PHP 7.4 or later). The plugin creates one table for the waiting list, adds a Stock Alerts screen under WooCommerce, two WooCommerce emails and a Stock alerts tab in My Account.
Open any sold out product: the Email me when it is back in stock form is under the "Out of stock" text. On a variable product choose a sold out option and the form appears for that variation. Logged in customers have their address filled in. The wording and placement are under WooCommerce → Stock Alerts → Settings:
| Setting | What it does |
|---|---|
| Enable | Shows the form on sold out products and sends alerts when stock returns. Off hides the form everywhere and stops sending; the waiting list is kept. |
| Position | Under the "Out of stock" text (default; follows the chosen variation), at the end of the product summary (the form appears for a sold out variation once it is chosen), or only where I place the shortcode. Shortcode: [dbis_form] on a product page, or [dbis_form product="123"] anywhere. |
| Title, button text, success message | The three strings the shopper sees. |
| Guests | On, visitors who are not logged in can ask for alerts. Off, the form asks them to log in first. |
| Confirmation (double opt-in) | Guests get a confirmation email and are on the list only after they click its link. Logged in customers never need to confirm, and an address that confirmed once is not asked again. Unconfirmed requests are removed after 7 days. |
| Consent box | A checkbox the shopper must tick, with your own wording. Links are allowed, for example to your privacy policy. |
| My Account | Adds the Stock alerts tab where customers see their requests and remove them. |
The form works without JavaScript (it posts and reloads the page with a notice), carries a nonce, a hidden honeypot field and a per visitor limit of 10 requests in 15 minutes.
| Moment | What the plugin does |
|---|---|
| The stock status changes to In stock | Whether you edited the product, used quick edit, ran a CSV import, restocked through the REST API, or an order was cancelled or refunded and its stock came back. A sending run is queued through WooCommerce's Action Scheduler (WP-Cron if it is not available). For a variation, the run is for that variation; for a product whose options were all sold out, the parent's list is sent when any option returns. |
| Wait before sending | An optional delay in minutes between the restock and the first email. Stock is checked again when the run starts, so a restock that was corrected in the meantime sends nothing and the list keeps waiting. |
| Sending | Each request is sent once, marked Notified with the date, and the next batch (Emails per run, 50 by default) is queued a minute later until the list is done. A request whose email could not be sent stays Waiting so the next run or Notify now tries again, and the attempt is written to WooCommerce → Status → Logs (source dbis). |
| Backorders | By default "On backorder" counts as available: no form, and a change to it sends the alerts. Tick Treat products on backorder as sold out to show the form on backordered products and send only when they are properly in stock. |
| Where | What |
|---|---|
| Subscribers tab | Every request with its product, email, customer, status (Waiting, Unconfirmed, Notified, Cancelled), request date and notified date. Filter by status, search by email or product name, sort, and use bulk Cancel, Put back on the list and Delete. Each row has Cancel or Put back on the list, Send alert now (when the product is in stock) and Delete. Export CSV downloads the current view. |
| Add a subscriber | Under the list: search for a product or variation, enter the email address and click Add. For requests that arrive by phone or email. The product must be sold out. |
| Most wanted tab | Sold out products ranked by the number of people waiting, with how many were notified before, the last request date, a View list button and, for products already back in stock, Notify now. |
| Product editor | A Back in stock alerts box shows how many people are waiting, unconfirmed and notified, by variation for variable products, with a link to the list. |
| Product deleted | Its waiting list is deleted with it. |
Both emails are standard WooCommerce emails under WooCommerce → Settings → Emails: Back in stock (sent to each person waiting) and Confirm back in stock alert (sent to guests when double opt-in is on). Edit the subject, heading and additional content, use the {product_name} and {site_title} placeholders, and preview them. The alert shows the product image, name and price, a Buy it now button that opens the product (with the variation preselected) and a "Remove me from this list" link. The templates live in the plugin's templates/emails/ folder and can be copied into yourtheme/woocommerce/emails/ like any WooCommerce email.
| Where | What |
|---|---|
| Product page | The form, then a thank you message in its place (or a notice after the reload without JavaScript). Asking twice for the same product says they are already on the list. |
| Confirmation link | Puts the request on the list and opens the product page with a notice. An expired or wrong link shows an error on the shop page. |
| Remove link | Cancels the request and opens the product page with a notice. Nothing else is sent. |
| My Account → Stock alerts | Open requests (by their account or their account email) with the product, request date, status and a Remove button. |
| Setting | What it does |
|---|---|
| Emails per run | Batch size for background sending, 10 to 500. |
| Keep sent alerts for | Days to keep Notified requests before the daily tidy-up removes them; 0 keeps them forever. |
| Uninstall | Delete the waiting list and these settings when the plugin is deleted. Off by default, so a reinstall finds everything as it was. |
| Hook | Use |
|---|---|
dbis_subscribed, dbis_confirmed, dbis_unsubscribed, dbis_alert_sent | Actions when a request is made, confirmed, cancelled, and when an alert is sent (the row and the product). |
dbis_wants_alerts, dbis_product_types | Filters: whether a product shows the form, and which product types can (simple, variation and variable by default). |
dbis_form_html | Filter the rendered form. The result is passed through an allowlist, so keep to form markup. |
dbis_requires_confirmation | Filter: whether a request needs a confirmation click (product and email are passed). |
dbis_account_endpoint, dbis_max_requests, dbis_limiter_ip | Filters: the My Account endpoint slug, the per visitor request limit, and the visitor address used for it (for proxies that do not restore it). |
Requests are rows in {prefix}dbis_subscriptions (product or variation id, parent id, user id, email, status, request, confirmation and sent dates). The background job is the Action Scheduler hook dbis_send in group dbis; the daily tidy-up is the WP-Cron event dbis_daily.
The form does not appear: the product must be published and its stock status Out of stock (products on backorder count as available unless you tick the backorder setting). Check that Enable is on and that the position is not "Only where I place the shortcode". On a variable product the form appears only after a sold out option is chosen. Themes with a custom single product template may not print the stock text; switch the position to "At the end of the product summary" or use the shortcode.
Nobody was emailed after a restock: open WooCommerce → Stock Alerts: Notified rows mean the emails were handed to WordPress, so check your mail delivery (an SMTP plugin helps). Rows still Waiting mean the run did not happen: the product's stock status must actually have changed to In stock (a quantity change on a product that was already In stock sends nothing), the Back in stock email must be enabled under WooCommerce → Settings → Emails, and WooCommerce's Action Scheduler must be running (WooCommerce → Status → Scheduled Actions shows the dbis_send actions). Click Notify now on the Most wanted tab to send straight away, and read WooCommerce → Status → Logs, source dbis.
"This page is out of date" when submitting: the page came from a cache older than the security token. Exclude product pages from full page caching for guests, or shorten their cache lifetime; the shopper only needs to reload.
The Stock alerts tab is missing from My Account: go to Settings → Permalinks and click Save once to refresh the endpoint, and check that the My Account setting is on.
Too many requests: a visitor is limited to 10 requests in 15 minutes by address; the dbis_max_requests filter changes the number.
What happens if I deactivate or delete the plugin: deactivating stops the sending runs and removes the My Account tab; the waiting list is kept. Deleting the plugin keeps the list and settings too, unless the Uninstall setting is ticked first.
We build and customise WooCommerce plugins for a living. If your store needs low stock alerts for the owner, SMS notifications, pre-orders or custom rules, tell us what and we'll quote it.