=== HyperDrop – Exclusive Drops & Access Codes for WooCommerce ===
Contributors: zyrixtech
Tags: woocommerce, product drops, access codes, waitlist, exclusive
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Run exclusive product drops: lock a collection or product behind access codes, take email sign-ups, schedule the launch and set limits.

== Description ==

**HyperDrop** turns any WooCommerce category or product into an exclusive drop — the way streetwear brands, artists and creators launch merch.

Stop sending launch codes one email at a time. Shoppers request their own code, get a one-tap unlock link, and everything is enforced all the way through checkout.

= Lock a whole collection or a single product =

* **Hidden mode** – the category page and its products disappear from the shop, search, home page and related products until the visitor unlocks them.
* **Preview mode** – the collection stays visible (great for themes that hide empty categories), but buying – and optionally prices – needs a code.
* **Single product drops** – the product stays visible; the Add to cart button becomes an unlock box.

= Access codes your way =

* **Instant** – shoppers enter their email and get a unique code automatically.
* **Codes from you only** – email codes to a VIP list or create a shared code like `VIPLAUNCH` for Instagram.
* One-tap **magic link** in every email.

= Scheduled drops =

* **Coming soon** page with a live countdown. People can sign up and enter codes early.
* **Live** for code holders, then optionally **open to everyone**, then optionally **ended**.
* Optional **"It's live!" email** to every code holder the moment the drop starts.

= Limits that stop resellers =

* Max of each item per order, max exclusive items per order.
* Orders per customer (matched by account, billing email and the email the code was sent to).
* Devices per code (stops code sharing), orders per code, code expiry.
* Sign-up spots with a "spots left" badge, emails per visitor, sends per email, code-guessing protection.

= Built for real stores =

* Step-by-step **setup wizard** – launch a drop in six steps.
* **Dashboard** with sign-ups, orders, items sold and exclusive sales.
* Manage the products in a drop and every code from one screen.
* **Card design** – style, button color, corners and width, with a live preview.
* **Test mode** – build and try a drop privately; only admins can see it until you click "Go live".
* **Spanish included** – show the store side in Spanish even on an English site.
* Works with block themes and classic themes, the block **Cart & Checkout** (Store API) and classic checkout, and High-Performance Order Storage (HPOS).
* No external services. Emails use your store's WooCommerce email template.

= HyperDrop Pro =

Everything above is free. [HyperDrop Pro](https://zyrixcode.com/hyperdrop) is an optional add-on for stores that want more: discounts on codes, a waitlist you approve, background images on the unlock card, CSV export, and more.

= Shortcode =

`[hyperdrop category="exclusive"]` shows the unlock box anywhere – for example on your home page.
`[hyperdrop product="123"]` does the same for a single product drop.

= Developer hooks =

Filters: `hyperdrop_is_gated`, `hyperdrop_is_term_gated`, `hyperdrop_is_staff`, `hyperdrop_code_prefix`, `hyperdrop_rate_limit`, `hyperdrop_email_message`, `hyperdrop_live_subject`, `hyperdrop_live_email_message`, `hyperdrop_signup_modes`, `hyperdrop_create_code_args`, `hyperdrop_card_attrs`, `hyperdrop_unlocked_message`.
Actions: `hyperdrop_unlocked`, `hyperdrop_term_unlocked`, `hyperdrop_signup_request`, `hyperdrop_code_sent`, `hyperdrop_order_redeemed`, `hyperdrop_live_emails_sent`.

== Installation ==

1. Install and activate WooCommerce.
2. Install HyperDrop from Plugins → Add New, or upload the zip, and activate it.
3. Go to **HyperDrop → + New exclusive drop** and follow the six steps.
4. Make sure your site timezone is set to your city under Settings → General, so expiry dates and schedules match your clock.

== Frequently Asked Questions ==

= Do shoppers need an account? =

No. Access is remembered in the shopper's session. Logged-in customers keep access across their devices.

= Can admins see locked products? =

Yes. Administrators and shop managers always see everything so you can preview the store. Use "View the store as a shopper" in the admin bar (or a private window) to see what shoppers see.

= Is HyperDrop available in Spanish? =

Yes. Spanish (Español) is included and works for every Spanish locale. Under HyperDrop → Settings → Store language you can show the store side (unlock card, messages and code emails) in Spanish even if your site runs in English. Admin screens follow each user's profile language.

= My category tile disappears for visitors. =

Some themes hide categories that have no visible products. Edit the category and choose **Preview** under "Before unlocking, visitors…" – the collection stays visible and buying needs a code.

= Does it work with the block checkout? =

Yes. Access, limits and discounts are enforced in the classic checkout and in the Cart & Checkout blocks.

= The "It's live!" email arrived a few minutes late. =

WordPress runs scheduled tasks when someone visits the site. For exact timing, set up a real cron job that calls `wp-cron.php`. The drop itself always opens on time.

= Does it send data anywhere? =

No. HyperDrop does not connect to any external service.

== Screenshots ==

1. Unlock page shown to visitors for a hidden collection.
2. Coming soon page with countdown.
3. Preview mode: products visible, buying needs a code.
4. Setup wizard.
5. Dashboard.
6. Limits screen.

== Changelog ==

= 1.0.4 =
* Security: every form and link input is now nonce-checked where it is read, together with a permission check in the admin. HyperDrop's admin links and filters carry a nonce, and "Saved" messages no longer travel in the URL.
* Emailed one-tap unlock links now open the drop page and submit its unlock form for the shopper, so the code is never read from the URL. Links in emails sent before this update still open the drop; the shopper enters the code.
* Removed the ?hyperdrop_lang= link option; "Match each shopper" uses the browser language.
* Page caching: HyperDrop no longer sets the global DONOTCACHEPAGE flag; its own pages send no-cache headers instead.
* All generated HTML is escaped when printed, and every database query uses prepared statements.
* Fix: the setup wizard's finish screen showed again when reopening the wizard.

= 1.0.3 =
* Fix: on stores with a collection in test mode, a category list could loop and run out of memory when WordPress's category cache was empty. Fixed, and WordPress's cached category tree is no longer filtered.
* Security: the shopper forms (enter a code, get a code) now use a nonce, and pages showing them are kept out of page caches.
* The setup wizard no longer shows a Pro teaser; the Pro tab is the only place Pro is mentioned.
* The "Exclusive" badge style now only touches product tiles that show it.

= 1.0.2 =
* New: Store language option "Match each shopper (English or Spanish)". Shoppers whose phone or browser is in Spanish see HyperDrop in Spanish, everyone else in English, on the same site.
* New: code emails and "It's live!" emails go out in the language each shopper signed up in.
* New: add ?hyperdrop_lang=es or ?hyperdrop_lang=en to a link to pick the language on purpose (remembered for that shopper).
* Spanish translation updated.

= 1.0.1 =
* Setup wizard: simpler Access step. Choose how people get access and when it launches; visibility, the locked-page message and open/end times move to an optional "Advanced settings" section.
* Setup wizard: add or change the category image in step 1, using the Media Library.
* Setup wizard: redesigned Limits step. Each limit has an on/off switch and a +/− number box, a "Use recommended" button sets anti-reseller limits in one click, and the less common limits move to "Advanced settings".
* Setup wizard: every drop now gets a shared drop code (a random one is filled in, or type your own). Email it to a list, or send each person their own code, and add a discount with Pro. The finish screen shows the code with a Copy button.
* Fix: admin styles and scripts now always load fresh after an update, even behind Cloudflare or browser caches.
* Spanish translation updated.

= 1.0.0 =
* First public release (previously released privately as "Zyrix Exclusive Drops"). Existing data from the previous name is moved over automatically.

== Upgrade Notice ==

= 1.0.4 =
Security hardening from the WordPress.org review. Recommended for everyone.

= 1.0.3 =
Fixes a possible memory error on category lists and adds nonces to the shopper forms. Recommended for everyone.

= 1.0.2 =
HyperDrop can now show English or Spanish to each shopper based on their phone language.

= 1.0.1 =
A simpler setup wizard and a category image picker.

= 1.0.0 =
First public release.
