=== CartKnock – Back in Stock Alerts for WooCommerce ===
Contributors: pluginnest
Tags: back in stock, waitlist, out of stock, stock alert, woocommerce
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Shoppers leave their email on a sold-out product. When it is back in stock, they get one email by itself.

== Description ==

A sold-out product usually means a lost sale: the shopper leaves and does not come back. CartKnock keeps them. On every sold-out product, and on every sold-out size or color, shoppers leave their email address. When you put the item back in stock, each of them gets one email with the product picture, the price and a **Buy now** button. You do nothing.

It works on phones and computers and needs no setup.

= What shoppers see =

Choose one of three looks:

* **Button + popup**: one "Notify me when it's back" button. A tap opens a small window in the middle of the screen with the product, the email box and one button. The page stays clean.
* **Soft card**: a light yellow card under "Out of stock" with the email box and button. Nothing pops up.
* **Slim bar**: the email box and a dark button joined in one slim bar.

After sending, the shopper sees "You're on the list. We'll email you once when … is back."

= Sizes and colors =

On products with options, the form shows only when the shopper picks a sold-out option, and it remembers which one. WooCommerce's grey Add to cart button for that option can be hidden, so only the form shows. When an option comes back, only the people waiting for that option get the email.

= The email =

* Sent by itself when the item is back in stock: by hand, by import, or when a cancelled order puts stock back.
* One email per person, never more. Shoppers who ask again later start a new wait.
* Your WooCommerce email look: your colors, logo and footer (WooCommerce → Settings → Emails).
* Product picture, name, price and a button that opens the product with the right size or color picked.
* Sent in small batches in the background, so big lists never slow your shop.
* Your own subject, heading, text and button, and a test email to yourself.

= The waiting list =

Under **WooCommerce → CartKnock** you see how many people wait, for which items, and how many emails went out. Open any item to see who asked and remove someone. If an item came back while the plugin was off, **Send now** sends the emails.

= Safe and private =

* Spam guard: a hidden field for bots, a limit per visitor, and checks that the item is really sold out.
* An optional tick box for consent, for shops that need a clear yes (for example in the EU).
* Works with WordPress's privacy tools: export and erase a shopper's requests. A suggested privacy policy text is added for you.
* No outside services and no tracking. Email addresses stay in your own database.

= Works with your shop =

* Classic themes and block themes, simple and variable products, WooCommerce order tables (HPOS).
* Page builders: put the shortcode `[cartknock]` on a product page if your builder hides the form.
* Translation ready, keyboard and screen reader friendly (the popup keeps focus inside and Escape closes it).

= Pro =

[CartKnock Pro](https://oneclickorderpro.com/cartknock/) is a separate add-on with: a real "14 people are waiting" count under the form, your button color and a coupon code in the email, a report of sign-ups, emails and the sales they brought, a "Notify me" button on shop and category pages, and a CSV export of the list. The free plugin works fully on its own.

== Installation ==

1. Go to **Plugins → Add New**, search for "CartKnock" and click **Install**, then **Activate**.
2. Open a sold-out product in your shop: the form is there.
3. Optional: choose the look and texts under **WooCommerce → CartKnock**.

WooCommerce must be installed and active.

== Frequently Asked Questions ==

= When is the email sent? =

When the product (or the size or color) changes from out of stock to in stock. That happens when you change the stock by hand, by an import, or when a cancelled order puts stock back.

= The emails do not arrive. =

CartKnock sends through your site, like WooCommerce's order emails. If order emails arrive, these arrive too. If not, your site needs an SMTP plugin. Use "Save and send a test email" on the Email tab to check.

= Does it work with page caching? =

Yes. The form gets a fresh security token when the page was cached or open for a long time.

= Can shoppers ask for a product on backorder? =

No. Products on backorder can be bought, so the form shows only on products that are out of stock.

= Is the email address kept after the email is sent? =

Yes, so you can see it on the waiting list. You can remove it there, or with Tools → Erase Personal Data. When you delete the plugin, you can choose to remove the whole list (Help tab).

== Screenshots ==

1. The popup on a sold-out product.
2. The soft card look.
3. A sold-out size on a phone, with the slim bar.
4. The email shoppers get.
5. The waiting list.
6. Settings with a live preview.

== Changelog ==

= 1.0.0 =
* First release.
