=== StockChime – Back in Stock Notifier & Waitlist for WooCommerce ===
Contributors: miratnasrullayev
Tags: back in stock, out of stock, waitlist, restock, stock alert
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.3.2
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Back in stock notifications for WooCommerce. Shoppers join a waitlist on out-of-stock products and get an email the moment stock returns.

== Description ==

StockChime is a back in stock notifier for WooCommerce. It adds a "Notify me" form to
out-of-stock products, so shoppers can join a waitlist instead of leaving the store. When
the product is back in stock, StockChime sends each waiting shopper an email alert.

Most back-in-stock plugins listen only to WooCommerce hooks. ERP syncs, CSV importers and
inventory tools frequently write stock straight to the database, so the hook never fires
and the notification is never sent. StockChime instead keeps a snapshot of the products
people are waiting on and reconciles it on a schedule, so it detects a restock regardless
of how the stock was written.

= What it does =

* A "Notify me when available" form on out-of-stock products, including per-variation
  forms on variable products.
* Back in stock email alerts when a watched product returns to stock.
* No shortcode and no setup: the waitlist form appears on every out-of-stock product.
* Scheduled reconciliation, so restocks written directly to the database are still caught.
* Editable email subject and body, with placeholders for product name, URL, image, price,
  stock quantity, store name and the unsubscribe link.
* A one-click unsubscribe link in every message.
* An admin screen listing subscribers, with filtering and bulk delete.
* A compose screen for sending a manual message to selected subscribers.
* Duplicate-proof dispatch: concurrent workers cannot send the same shopper the same
  restock twice.
* Full uninstall cleanup - deleting the plugin removes its tables, options and scheduled
  jobs. Deactivating it removes nothing.

= Requirements =

WooCommerce 7.0 or newer. Your site must be able to send email. By default StockChime uses
the mailer WordPress is already configured with. You can also give StockChime its own SMTP
server in StockChime > Settings.

= Roadmap =

These are planned and **not** in this release: price drop alerts, WhatsApp, SMS and web
push channels, double opt-in confirmation, and CSV export.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/stockchime`, or install it from Plugins > Add New.
2. Activate it through the Plugins screen.
3. Go to StockChime > Settings to set the sender name and address.
4. Go to StockChime > Templates to edit the message shoppers receive.

The subscribe form appears automatically on out-of-stock products. No shortcode is needed.

== Frequently Asked Questions ==

= Is this a waitlist plugin? =

Yes. Each out-of-stock product gets its own waitlist. A shopper joins it by leaving an
email address, and StockChime emails everyone on the waitlist when the product is back in
stock. The Subscribers screen shows who is waiting for which product.

= Do I need a shortcode or a block? =

No. The "Notify me" form appears automatically on every out-of-stock product and on every
out-of-stock variation. It is hidden again when the product is in stock.

= Does it work with variable products? =

Yes. The form is bound to the variation the shopper has selected, so someone looking at a
sold-out size can subscribe to that size even when other sizes are in stock.

= Will it catch a restock done through an import or an ERP sync? =

Yes. That is the main reason this plugin exists. StockChime reconciles a stored snapshot of
watched products on a schedule rather than relying only on WooCommerce hooks, so a stock
change written straight to the database is still detected.

= Does it send email through a third-party service? =

No. StockChime makes no outbound request to any endpoint you have not configured yourself.
Messages go out through WordPress's own mail function and whatever SMTP you have set up.

= What happens to subscriber data if I delete the plugin? =

Deleting the plugin removes every table, option and scheduled job it created, including
stored email addresses. Deactivating it removes nothing, so you can safely deactivate for
debugging and reactivate with your data intact.

== Privacy ==

StockChime stores the email address a shopper submits, the product they are waiting on, the
time they subscribed, and the IP address the subscription came from. This data is kept in
your own database and is never sent anywhere else. Every message includes an unsubscribe
link, and a store administrator can delete any subscriber from the Subscribers screen.
Deleting the plugin deletes all of it.

== Screenshots ==

1. The "Notify me" back in stock form on an out-of-stock WooCommerce product.
2. The Subscribers screen: the waitlist for every out-of-stock product, with filters and bulk delete.
3. The back in stock email template editor, with placeholders for product, price and stock.
4. Settings: sender name and address, optional SMTP, the consent checkbox and a test email.

== Changelog ==

= 0.3.2 =
* Plugin listing: clearer name, description and tags.
* Tested with WooCommerce 11.2.

= 0.3.1 =
* Renamed the plugin to StockChime Restock Alerts for WooCommerce.

= 0.3.0 =
* Security: the subscribe form and the unsubscribe confirmation now verify a nonce.
* Security: all admin screen output is escaped through an explicit allow-list.

= 0.2.0 =
* Added per-variation subscribe forms on variable products.
* Added uninstall cleanup for tables, options and scheduled jobs.
* Fixed a race where two concurrent workers could both announce the same restock.
* Fixed edited email templates not being applied when sending.

= 0.1.0 =
* First release: subscribe form, scheduled reconciliation, email alerts, unsubscribe links.

== Upgrade Notice ==

= 0.3.2 =
Listing and compatibility update. No change to how the plugin works.

= 0.3.1 =
Renamed to StockChime Restock Alerts for WooCommerce.

= 0.3.0 =
Hardens the subscribe and unsubscribe requests with nonces.

= 0.2.0 =
Fixes duplicate restock emails and adds variation-level subscribe forms.
