WooCommerce plugin docs / Stock Alerts

Stock alerts (Notify me)

Overview

On out-of-stock product cards, shoppers can subscribe to a restock email. There is no dedicated admin settings screen for this feature; it is always flagged in widget config (features.stockAlerts: true).

How It Works

  1. Card shows Notify me.
  2. Shopper enters email; widget POST /aiwsa/v1/stock-alerts with product_id + email.
  3. Stock_Alert_Service stores the subscription.
  4. Stock_Alert_Listener watches stock changes; Stock_Alert_Mailer sends mail when back in stock.

How to Enable It

No toggle. Requires Enable AI Agent (so the widget loads) and products that are out of stock in the assistant’s results (Include out-of-stock products or an explicit availability ask).

Configuration

None in AI Assistant settings. Emails use WordPress mail.

Frontend Usage

Bell / Notify me → email → success: “We’ll email you when this product is back in stock.”

Example

Out-of-stock starter motor card → notify shopper@email.com → restock in WooCommerce → email sent.

Behavior

SituationWhat happens
Invalid emailClient-side error
DuplicateTreated as subscribed (idempotent-style success path)
Product in stock alreadySubscribe may be rejected by the service (implementation validates product)

Limitations

  • Not a marketing list manager.
  • No admin UI to export alerts in this version (table exists internally).
  • Implementation status of every stock-status edge case: see Stock_Alert_Service if you customize.

Troubleshooting

Button missing: product is in stock or not shown. Mail not arriving: WordPress wp_mail / SMTP, not the chat widget.