Skip to content

Using waitlists

This walkthrough follows a single back-in-stock cycle end to end: a shopper signs up on an out-of-stock product, you restock it, and every pending subscriber is emailed automatically.

When a product is out of stock or on backorder, Restock renders its waitlist form in the product summary — an email field, a required consent checkbox and a submit button. For a logged-in customer the email is pre-filled.

The shopper enters an email, ticks consent and submits. The submit is an asynchronous fetch (no page reload, no jQuery), and the result is announced in an aria-live region — success, invalid email or missing consent.

On a variable product, the form appears once the shopper selects an unavailable variation. Restock stores that variation ID, so the signup is for the specific option the shopper wanted, not the product as a whole.

Set the product (or variation) stock status back to In stock in WooCommerce. When WooCommerce fires woocommerce_product_set_stock_status with instock, Restock emails every pending subscriber for that product — and, for variations, its parent — using wp_mail. Each subscriber emailed successfully is marked notified, so nobody is contacted twice. There is no queue or cron service to set up.

The notification is a plain-text email built from your configured subject, intro and closing text. It comes from your site’s own mailer, so deliverability depends on your WordPress email setup (an SMTP plugin or your host). If a test email does not arrive, check mail delivery before debugging Restock.

Logged-in customers see a My Account → Waitlists tab listing their active signups, each with its current stock status and a leave-waitlist action. Guests do not have an account view; their signup still receives the restock email.

By default the form is added to the single-product summary. To put it elsewhere in a custom product layout, use the shortcode:

[restock_waitlist]
[restock_waitlist id="123"]

id targets a specific product. Either way the form still only renders when that product is out of stock or on backorder, so it never shows on an in-stock product.

Open WooCommerce → Restock → Subscribers to view signups, filter by product, and export the list as CSV — useful for gauging demand for a product before you reorder.

The form is server-rendered in PHP and sits in the normal document flow on the product summary — there is no lazy injection that pushes content around, so it does not hurt Cumulative Layout Shift. The only script is a small vanilla-JavaScript fetch for the submit, loaded defer in the footer. The email field has a real label (as screen-reader text), the consent checkbox is required, and the form sets aria-busy while submitting and announces results via aria-live — built with WCAG 2.2 AA in mind.