=== NBKB VIP Plus for WooCommerce - Automated Loyalty & Customer Retention Suite ===
Contributors: nbkblabs
Donate link: https://nbkblabs.com
Tags: woocommerce, loyalty, customer retention, free shipping, vip club
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
WC requires at least: 8.0
WC tested up to: 11.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn one-time shoppers into repeat buyers with automated rolling spend milestones, automatic free shipping, and VIP member perks.

== Description ==

Getting a customer to place their first order is expensive. Getting them to come back and buy again is where e-commerce stores actually make a profit.

Instead of running constant sitewide sales or sending one-off coupon codes that eat into your margins, **NBKB VIP Plus** gives your store a dedicated customer retention engine. When shoppers reach your qualifying spend or order count milestone over a rolling 365-day window, the plugin automatically upgrades them to VIP status.

Active VIP members get instant, zero-friction perks at checkout - including automatic free shipping and storewide member pricing - with no coupon codes or manual admin work required.

---

### Is This Plugin Right for Your Store?

* **YES, if:** You sell physical or digital goods on WooCommerce and want to increase repeat order frequency, lift Average Order Value (AOV), and reward your most valuable customers with free shipping and member rates.
* **NO, if:** You are looking to put blog articles, videos, or online course content behind a paywall (use a content-restriction membership plugin for that).

---

### Key Features (100% Free Core Plugin)

* **Flexible Qualification Milestones:** Choose how customers qualify:
  * By Total Spend (e.g. spend $200 / €200 / ₹5,000 in completed orders).
  * By Order Count (e.g. complete 10 or 15 successful orders).
  * By Whichever Comes First (spend threshold OR order count).
* **Rolling 365-Day Window:** Spend and order counts are tracked over a moving window (default 365 days), encouraging customers to keep ordering year-round to maintain their status.
* **Automatic Free Standard Shipping:** When an active VIP member checks out, standard delivery fees are automatically waived to $0.00 with a clean `(VIP Free)` label. No coupon codes needed.
* **Product-Specific VIP Pricing & Exclusions:** Set custom fixed VIP member prices per product or variation, or easily exclude specific products from VIP discounts directly from the Product Data panel.
* **Dual Price Display on Catalog:** Non-members see crossed-out regular prices alongside a clear `VIP Member Rate` badge, giving them a visual reason to reach your milestone.
* **Header Navigation Member Badge:** Highlights VIP prestige with a clean member badge in both classic navigation menus and Gutenberg block navigation.
* **Dedicated Customer Loyalty Portal:** Adds a clean `VIP Plus Club` tab to WooCommerce My Account where customers can see their active status, days remaining, perks, and progress toward renewal.
* **Dedicated VIP Members Admin Hub:** View all qualified members in a clean table showing total spend, order count, days left, and 1-click status management.
* **Automated Welcome Email:** Dispatches a clean, transactional celebration email when a customer hits the milestone. Includes dynamic tags for customer name, discount rate, and validity dates.
* **Zero Checkout Delays:** Membership checks use lightweight in-memory capability lookups. Order calculations run only in the background when an order completes, keeping your cart and checkout fast.
* **100% HPOS and Block Native:** Declares native support for WooCommerce High-Performance Order Storage (Custom Order Tables) and Gutenberg Cart/Checkout Blocks.

---

### Pro Enterprise Add-on Features

For stores looking to monetize their loyalty program directly, the Pro Add-on adds:

* **Multi-Tier VIP Progression Ladder:** Build customizable loyalty ladders (Silver, Gold, Platinum, Diamond) with progressive discount percentages, custom evaluation windows, and frequency durations.
* **Direct Paid VIP Pass Products:** Sell monthly, quarterly, or annual VIP passes directly as digital products with instant activation, duration stacking, quantity multipliers, and refund safeguards.
* **Loyalty Coins & Rewards Wallet Engine:** Gamified member rewards with tier multipliers and 1-click cart and checkout discount redemption.
* **Flash Sale 24h Early Access Locker:** Lock product drops exclusively for VIPs with live digital countdown timers, teaser mode, and impenetrable server-side cart injection blockers.
* **Interactive My Account Tier Dashboard:** Dedicated member portal inside WooCommerce My Account with real-time tier progression, spend targets for the next tier, and expiration countdowns.
* **Zero Mid-Term Revocation & Auto-Renewal:** Guaranteed perks for the full frequency duration with automated rolling spend evaluation upon term expiration.

---

== Installation ==

1. Upload the `nbkb-vip-plus` folder to your `/wp-content/plugins/` directory, or install the zip directly via **Plugins > Add New** in WordPress.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to **VIP Plus Club > Settings** in your WordPress admin menu.
4. Set your milestone criteria (Spend threshold or Order count), discount rate, and free shipping options.
5. (Optional) Customize the automated VIP notification email under the **VIP Welcome Email** tab.

== Frequently Asked Questions ==

= Does this plugin slow down my checkout page? =
No. NBKB VIP Plus is built with an in-memory capability lookup architecture. Checking whether a customer is an active VIP takes less than 0.001 ms in RAM with zero order database queries during checkout. Spend milestones are calculated asynchronously only when an order status changes to completed.

= Does it work with WooCommerce HPOS (High-Performance Order Storage)? =
Yes. The plugin is 100% compatible with WooCommerce Custom Order Tables as well as legacy post tables.

= What happens when a customer's 365-day validity ends? =
If the customer has not maintained enough spend or completed orders in their rolling window, their membership reverts back to standard customer status with no interruption to your store. Their account portal will display their current progress toward unlocking VIP status again.

= Can I configure spend thresholds in currencies other than USD? =
Yes. The plugin reads your store's active WooCommerce currency automatically. You can set spend thresholds in INR, EUR, GBP, AUD, CAD, JPY, or any currency supported by WooCommerce.

= Can I set custom VIP prices for individual products? =
Yes. On the Edit Product screen (under General pricing options for simple products, or under each variation for variable products), you can enter a specific "VIP Member Price". If left blank, the global storewide percentage discount applies. You can also check "Disable VIP Plus discount" to exclude low-margin or clearance items completely.

== Screenshots ==

1. VIP Members Admin Hub showing active member status, spend progress, order counts, and validity countdowns.
2. Milestone Qualification Settings (Spend threshold, Order count target, rolling window duration, qualifying order statuses).
3. VIP Perks Settings (Automatic Free Shipping toggle, storewide % discount, navigation badge, custom perks list).
4. Automated VIP Welcome Email configuration with dynamic placeholders and live preview switcher.
5. Customer My Account Loyalty Portal with active perks tiles, days remaining, and shop CTA.

== Changelog ==

= 1.0.0 =
* Initial public release on WordPress.org.
* Rolling spend progression and completed order count milestones.
* Automatic zero-friction free shipping perk for VIP customers.
* Storewide VIP percentage discounts and product-level discount exclusions.
* Dual catalog price display with VIP Member Rate callout.
* Header navigation member badge for classic menus and block navigation.
* Dedicated My Account VIP Club dashboard tab with progress tracking.
* Automated VIP celebration transactional email with dynamic customer tags.
* Dedicated top-level VIP Plus Club admin menu and VIP Members management hub.
* Full WooCommerce HPOS and Gutenberg Cart/Checkout Blocks compatibility.
