=== CartEngine Back in Stock Alerts for WooCommerce ===
Contributors: cartengine
Tags: back in stock, woocommerce waitlist, out of stock notification, notify when available, stock alert
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let shoppers subscribe to out-of-stock products and automatically notify them by email when items are back in stock.

== Description ==

**CartEngine Back in Stock Alerts for WooCommerce** helps recover sales from out-of-stock products. Instead of losing customers forever, let them subscribe with one click and automatically email them when you restock.

No complicated setup. No bloat. Just a clean "Notify Me" form, reliable email delivery, and a simple subscriber dashboard right inside WooCommerce.

=== How It Works ===

1. A visitor lands on an out-of-stock product page
2. They enter their email and click **"Notify Me When Available"**
3. You restock the product (manually or via import)
4. The plugin automatically sends a back-in-stock email to all subscribers
5. The customer clicks the link and completes their purchase

=== Key Features ===

**Back-in-Stock Notifications**
Automatically triggered when product stock status changes to "in stock" — no manual work needed. Emails are sent in batches of 50 with configurable throttle to protect your server.

**AJAX Subscription Form**
The "Notify Me" form submits without a page reload. Displays directly on the product page — no extra pages, no popups, no friction.

**Variable Product Support**
Customers can subscribe to specific variations (size, color, etc.). When you restock a particular variation, only subscribers to that variation receive the notification.

**Shortcode `[safw_stock_alert]`**
Place the subscription form anywhere using the `[safw_stock_alert]` shortcode. Supports `product_id` and `variation_id` attributes for full flexibility.

**Subscriber Management**
View and manage all subscribers from **WooCommerce → Stock Alert Subscribers**. Filter by status (active, notified, unsubscribed), sort by date or email.

**Spam & Abuse Protection**
Built-in IP-based rate limiting (5 subscriptions per IP per hour) keeps your list clean without any configuration.

**Unsubscribe Link in Every Email**
Every notification email includes a one-click unsubscribe link. No account required. GDPR-friendly by design.

**Customizable Email & Form**
Configure button text, form label, email subject, sender name, and accent color directly in **WooCommerce → Settings → Stock Alerts**.

**Social Proof Counter**
Optionally show how many people are waiting for a product ("12 people are waiting for this item"). Creates urgency and encourages subscriptions.

**GDPR & Privacy Ready**
Integrates with WordPress's built-in Personal Data Export and Erase tools. Subscriber data stays on your server — no third-party services.

=== Why Choose CartEngine Back in Stock Alerts for WooCommerce? ===

* **Lightweight** — zero dependencies, no jQuery plugins, no external scripts
* **WooCommerce-native** — settings live inside WooCommerce, not a separate menu
* **Works with any theme** — block themes (Twenty Twenty-Five) and classic themes
* **Developer-friendly** — hooks and filters to customize behavior

=== Upgrade to Stock Alert Pro ===

[Stock Alert Pro](https://cartengine.dev/products/stock-alert-pro/?utm_source=wporg&utm_medium=readme&utm_campaign=free) extends the free plugin with powerful conversion tools:

* 📊 **Demand Analytics Dashboard** — see which products generate the most waitlist demand
* 🎯 **Smart Stock-Limited Notify** — alert subscribers only when stock covers their demand
* 💬 **Popup/Modal Mode** — capture emails with a lightbox form instead of inline
* ✉️ **Multiple Email Templates** — choose from several professionally designed templates
* 📈 **Conversion Tracking** — measure how many subscribers actually purchase
* 📤 **CSV Export** — download your subscriber list for any use
* 🔐 **Double Opt-In** — confirm subscriptions for cleaner lists and full GDPR compliance
* 🔔 **Admin Digest Emails** — daily/weekly summary of new subscriptions and conversions

[Upgrade to Stock Alert Pro →](https://cartengine.dev/products/stock-alert-pro/?utm_source=wporg&utm_medium=readme&utm_campaign=free)

== Installation ==

1. In your WordPress admin, go to **Plugins → Add New**
2. Search for **CartEngine Back in Stock Alerts for WooCommerce** and click **Install Now**
3. Click **Activate**
4. Go to **WooCommerce → Settings → Stock Alerts** to configure your form and email settings
5. The subscription form will automatically appear on all out-of-stock product pages

**Manual Installation:**
1. Download the plugin ZIP file
2. Upload via **Plugins → Add New → Upload Plugin**
3. Activate and configure as above

== Frequently Asked Questions ==

= Does it work with variable products? =

Yes. When a customer selects an out-of-stock variation, the subscription form appears for that specific variation. When you restock that variation, only its subscribers receive the notification.

= Will it slow down my store? =

No. The plugin adds minimal overhead. The subscription form is loaded via AJAX, and notification emails are sent via WP-Cron in batches — not on page load.

= Does it work with block themes like Twenty Twenty-Five? =

Yes, fully compatible with block themes and classic themes. The form output is plain HTML with minimal inline styles.

= How are emails sent — via my host or a third-party service? =

Emails are sent via WordPress's built-in `wp_mail()` function, which uses your hosting's mail server by default. You can route through any SMTP plugin (WP Mail SMTP, FluentSMTP, etc.) for better deliverability.

= Is it GDPR compliant? =

Yes. Every notification email contains a one-click unsubscribe link. The plugin also integrates with WordPress's Personal Data Export and Erase tools (Tools → Export Personal Data / Erase Personal Data).

= Where can I manage subscribers? =

Go to **WooCommerce → Stock Alert Subscribers** to view, filter, and delete subscriber records.

= Can I use it with a shortcode? =

Yes. Use `[safw_stock_alert]` to embed the form anywhere. You can pass `product_id` and `variation_id` attributes to target a specific product.

= What happens if the same email subscribes twice to the same product? =

The subscriber receives a message that they are already on the waitlist. If they had previously unsubscribed or been notified, their subscription is automatically reactivated.

= Is there a limit to the number of subscribers? =

No limit. Subscriber data is stored in your WordPress database. Notifications are sent in batches of 50 with a configurable throttle interval.

= Is there a Pro version? =

Yes. [Stock Alert Pro](https://cartengine.dev/products/stock-alert-pro/?utm_source=wporg&utm_medium=faq&utm_campaign=free) adds demand analytics dashboard, smart stock-limited notify (FIFO queue), popup/modal mode, multiple email templates, conversion tracking, CSV export, double opt-in, and admin digest emails. One-time purchase, no subscription.

== Screenshots ==

1. "Notify Me" subscription form on a product page
2. Back-in-stock email notification received by customer
3. Subscriber list in WooCommerce admin
4. Settings page inside WooCommerce → Settings → Stock Alerts

== Changelog ==

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.0 =
Initial release. Install and configure via WooCommerce → Settings → Stock Alerts.
