Home / Forums / WoodMart support forum / Waitlist sends “Back in stock” emails before the product is published
Home › Forums › WoodMart support forum › Waitlist sends “Back in stock” emails before the product is published
Waitlist sends “Back in stock” emails before the product is published
- This topic has 2 replies, 2 voices, and was last updated 3 hours, 58 minutes ago by
Aizaz Imtiaz Awan.
-
AuthorPosts
-
July 29, 2026 at 2:31 pm #724526
boris.belica2ParticipantHello XTemos team,
First of all, thank you for the excellent theme and the Waitlist feature. While implementing it on one of our WooCommerce stores, we discovered a scenario where customers may receive the “Back in stock” email before the product is actually available for purchase.
After investigating the Waitlist module, we believe this is not a bug in WooCommerce itself, but rather a logical edge case in the current implementation.
Scenario
Imagine the following workflow:
-
A product (or one of its variations) is currently out of stock.
Customers subscribe to the Waitlist.
The store owner switches the parent product to Draft in order to prepare a new collection, update images, descriptions, pricing, etc.
While the product is still in Draft, the stock quantity is updated from 0 to 10.
The product is published a few minutes (or even hours) later.Current behaviour
As soon as the stock changes to In stock, the Waitlist module immediately schedules the notification emails.
Customers receive:
“Good news! The product is back in stock.”
However, the product is still Draft, therefore:
it cannot be purchased,
the product URL may return 404,
or customers simply cannot access it.From a customer’s perspective, this is confusing because the notification arrives before the product is publicly available.
__
Expected behaviour
The notification should only be scheduled when both conditions are satisfied:
the product (or variation) is in stock;
the product is published.For variations, the parent product should also have the publish status.
If stock becomes available while the product is still a Draft, the notification should simply wait until publication.
__
Suggested solution
Instead of simply cancelling the email, a deferred notification mechanism could be implemented.
Suggested flow:
When stock changes
detect the product / variation becoming available;
if the product is already published, schedule emails as today;
otherwise mark the notification as pending.
When the product becomes published
verify that:
the product is still published,
it is still in stock,
Waitlist subscriptions still exist,
schedule the normal native Waitlist emails,
remove the pending flag.This keeps the existing email templates, batching logic and Waitlist database completely unchanged while ensuring customers only receive notifications for products that are actually available.
__
Additional recommendation
As a final safety layer, it may also be worth validating immediately before the email is sent that:
the product still exists;
the product is still published;
the variation’s parent is published;
the item is still in stock.This would also protect against race conditions or third-party inventory integrations
__
Tested solution
To verify the concept, I created a custom PHP implementation that:
supports simple products;
supports variable products;
supports individual variations;
delays notifications while the product is a Draft;
automatically sends them immediately after publication;
preserves the existing WoodMart email templates;
preserves the existing batching mechanism;
prevents duplicate scheduled events.I have attached the implementation as a reference.
Perhaps this behaviour could be considered for a future version of the Waitlist module, as I believe it would improve the user experience for stores that prepare products before publishing them.
Thank you!
July 29, 2026 at 2:34 pm #724527
boris.belica2Participantphp snippet
July 30, 2026 at 9:35 am #724570Hello,
We’ll consider how we can improve this functionality in future updates.
Best Regards.
-
AuthorPosts
Tagged: waitlist
- You must be logged in to create new topics. Login / Register