=== WaitSync — Virtual Waiting Room for WooCommerce ===
Contributors: waitsync
Tags: waiting room, queue, flash sale, traffic management, woocommerce
Requires at least: 5.8
Tested up to: 6.7
Stable tag: 1.0.0
Requires PHP: 7.4
License: MIT

== Description ==

Protect your WooCommerce store from crashing during flash sales, product drops, and high-demand events.

WaitSync creates a fair, FIFO (first-in, first-out) virtual waiting room that holds visitors in line while controlling the flow of traffic to your store. Features include:

* **Fair Queue**: Visitors are served in the order they arrive
* **Cryptographic Verification**: Ed25519 signed admission passes prevent queue jumping
* **Automatic Protection**: Seamlessly redirects visitors to the waiting room when your store is under load
* **WooCommerce Integration**: Automatically clears admission after purchase
* **Zero Impact When Idle**: Plugin does nothing when the waiting room is disabled

== Installation ==

1. Upload the `waitsync-woocommerce` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to WooCommerce → WaitSync to configure your API key and queue
4. Enable the waiting room when you're ready to protect your store

== Configuration ==

1. **WaitSync Host URL**: Your WaitSync instance URL (e.g., `https://waitsync.io`)
2. **API Key**: Generate from your WaitSync dashboard → API Keys
3. **Queue Key**: The queue identifier from your WaitSync dashboard
4. **Protected Pages**: Choose which pages to protect (shop only, all WooCommerce pages, or checkout only)

== Frequently Asked Questions ==

= Does this slow down my store? =
No. The plugin only adds a lightweight cookie check. When the waiting room is disabled, it does nothing.

= Can visitors bypass the queue? =
No. Admission passes are cryptographically signed with Ed25519 and verified server-side.

= What happens after a visitor purchases? =
The admission cookie is automatically cleared on the WooCommerce thank-you page.

== Changelog ==

= 1.0.0 =
* Initial release
* WooCommerce settings integration
* Automatic redirect to waiting room
* Ed25519 admission pass verification
* Post-purchase cookie cleanup
* Heartbeat script injection
