=== Presale Waitlist for WooCommerce ===
Contributors: fangox
Tags: woocommerce, waitlist, presale, product launch, invitation
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Waitlist instead of add-to-cart for scarce products: a quota of places, customer
registration and single-use invitation links for a priority purchase.

== Description ==

Some products should not simply go to whoever refreshes the page fastest: a limited
drop, a hand-made batch, an advent calendar. This plugin turns those products into a
managed queue.

Switch the waitlist on for a product and nobody can order it any more. The add-to-cart
button is replaced by a sign-up form. When you are ready, you invite people from the
list, one by one or in batches. Each invitation unlocks the product for exactly one
customer account, for a limited quantity and a limited time. After the purchase, or
after the deadline, the right to buy is gone and the next person can move up.

**What it does**

* Blocks the product for everyone while the waitlist is running
* Quota of places per product; the list closes itself when it is full
* Shows the remaining places, the full ratio, or nothing at all
* Customers get a shop account when they sign up
* Single-use invitation links: one account, a limited quantity, a deadline
* Expired invitations are released automatically by a scheduled task
* Admin overview with bulk invitations and CSV export
* A "My waitlists" section in the customer account
* Templates and hooks for your own adjustments

**Templates and hooks**

Copy the templates into your theme under `yourtheme/presale-waitlist-for-woocommerce/`
to change the markup. Among the available hooks are `wcwl_is_waitlist_product`,
`wcwl_validate_signup`, `wcwl_after_signup`, `wcwl_form_extra_fields`,
`wcwl_invite_sent`, `wcwl_invite_redeemed`, `wcwl_invites_expired` and
`wcwl_settings_fields`.

== Installation ==

1. Upload the ZIP under Plugins > Add New > Upload Plugin, then activate it.
2. Go through WooCommerce > Settings > Waitlist (deadlines, quantity, texts).
3. Open a product, switch to the Waitlist tab, enable it and set the quota.
4. Invite customers under WooCommerce > Waitlist.

== Frequently Asked Questions ==

= Can customers join without an account? =

No. Without a customer account the later purchase cannot be limited to one person.
The account is created straight from the sign-up form.

= Does this work with a page cache? =

Waitlist product pages set DONOTCACHEPAGE and send no-cache headers. If your cache
plugin ignores that, exclude those URLs there by hand. Otherwise a stale form with an
expired nonce may be served.

= Does it work with the block-based cart and checkout? =

Yes. The purchase block hooks into `woocommerce_is_purchasable`, the add-to-cart
validation and the cart check, so the Store API is covered as well.

= What happens to an invitation that is not used? =

An hourly scheduled task marks it as expired, which frees the place again.

== External services ==

This plugin does not contact any external service. No data leaves your site.

== Privacy ==

The plugin stores waitlist entries: name, email address, IP address and timestamp.
The IP address serves as proof of the sign-up. Deleting the plugin only removes this
data if you enable the corresponding setting.

== Screenshots ==

1. The waitlist form replaces the add-to-cart button on the product page.
2. Waitlist tab in the product data panel with the quota.
3. Admin overview with bulk invitations.
4. Settings for invitations, display and texts.

== Changelog ==

= 1.0.2 =
* First public release.
