=== KEYMARIATOO - digital product license manager & selling tool ===
Contributors: avtandilimakhatadze
Donate link: https://wp.mariatoo.com
Tags: woocommerce, license manager, license key, digital downloads, software license
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: am-license-manager

Sell digital product license keys, serials, and activation codes in WooCommerce with automated stock allocation and real-time dashboard.

== Description ==

**KEYMARIATOO** is an all-in-one digital product license manager and selling tool designed specifically for WooCommerce. If you sell software licenses, video game activation keys, PIN codes, gift cards, or digital access tokens, KEYMARIATOO automates the entire delivery process right from order checkout.

Once a customer completes a purchase, the plugin instantly generates or allocates a unique license key and delivers it right to the customer on their order confirmation page, inside their account details, and in their WooCommerce receipt email.

= Key Features (Free Core) =
* **Dedicated Top-Level Sidebar Menu:** Access your dashboard and settings directly from the **KEYMARIATOO** menu item located right below WooCommerce in your WordPress dashboard.
* **Instant Automated Key Issuing:** Automatically assigns a unique license key immediately upon order completion.
* **Stock Auto-Sync:** Automatically synchronizes WooCommerce product inventory (`_stock`) with your available license pool or single assigned key.
* **Advanced Pattern Generator Engine:** Support for dynamic code formatting tags including `{ALPHANUM:X}`, `{DIGITS:X}`, `{ALPHA:X}`, `{YYYY}`, `{MM}`, and `{DD}`.
* **Real-Time License Dashboard:** Fast, single-page management panel built with modern WordPress Block UI components.
* **WooCommerce Product Tab Integration:** Seamlessly configure license rules on individual WooCommerce products with one click.
* **Customer Receipt & Email Display:** Prominently displays issued activation codes on order confirmation receipts, account dashboards, and WooCommerce transactional emails.
* **Native REST API Validation:** Built-in WordPress REST endpoint (`/wp-json/mariatoo-license/v1/validate-free`) allowing your desktop apps, games, or client websites to verify keys automatically.

= External Service Disclosure (SaaS & PRO Management) =
In compliance with WordPress.org Plugin Directory Guidelines (#6 and #7), this plugin offers optional integration with our authoritative SaaS License Management Hub at **https://wp.mariatoo.com**:
* **Service Name:** wp.mariatoo.com Authority Hub
* **Service Purpose:** Optional cloud license synchronization, multi-domain quota enforcement, real-time telemetry, and commercial PRO add-on distribution.
* **Data Transmitted:** When validated or connected against the Hub, your site securely transmits the site URL (`site_url`), license key (`license_key`), client version (`client_version`), and IP address for domain quota verification and abuse prevention.
* **Terms of Service:** https://wp.mariatoo.com/terms-and-conditions
* **Privacy Policy:** https://wp.mariatoo.com/privacy-policy

== Installation ==

1. Go to your WordPress admin dashboard and navigate to **Plugins → Add New**.
2. Search for **KEYMARIATOO** (or upload the `am-license-manager.zip` package via **Upload Plugin**).
3. Click **Install Now** and then **Activate**.
4. Once activated, click on **KEYMARIATOO** in your WordPress sidebar (or **Settings → License Manager**) to open your management dashboard.

== How to Use & Quick Start Guide ==

Getting started with KEYMARIATOO takes less than 2 minutes:

= Step 1: Open the License Manager Dashboard =
In your WordPress sidebar menu right below WooCommerce, click on **KEYMARIATOO → Licenses Dashboard**. Here you will see your total issued keys, product allocations, and real-time activity statistics.

= Step 2: Enable License Issuing on Your WooCommerce Product =
1. Go to **Products → All Products** and click **Edit** on any digital product.
2. Scroll down to the **Product Data** section and click on the new **License Key** tab on the left.
3. Check the **Enable License Delivery** box.
4. Check the **Auto-Sync WooCommerce Stock** box if you want product inventory automatically synchronized with your available license keys.
5. Choose how you want keys generated:
   * **Single Assigned Key:** Bind a specific code to this product.
   * **Dynamic Pattern Generation:** Auto-generate codes using formatting tags such as `PRO-{ALPHANUM:8}-{YYYY}` or `KEY-{ORDER_ID}-{RANDOM}`.
6. Click **Update** to save your product settings.

= Step 3: Automated Customer Delivery =
When a customer purchases the product:
* The license key is automatically assigned when the order status turns **Paid / Completed**.
* The customer instantly sees their key on the **Thank You / Order Confirmation page**, inside **My Account → Orders**, and in their **order confirmation email**.

== Frequently Asked Questions ==

= Does this plugin work with any WooCommerce product type? =
Yes! You can enable license issuing on simple digital products, downloadable items, and virtual goods.

= Do I need to pay for a subscription to use this plugin? =
No. The core free plugin includes everything you need to sell digital products, auto-generate keys, and display them to your customers. Optional advanced features (Bulk CSV Import, Multi-Domain Quotas, Hardware ID Binding, and Database Encryption at Rest) are available through our standalone PRO add-on at https://wp.mariatoo.com.

= Where can I view and manage all issued license keys? =
You can view, search, revoke, or delete all issued license keys directly from **KEYMARIATOO → Licenses Dashboard** (or **Settings → License Manager**) inside your WordPress dashboard.

== Screenshots ==

1. **Dedicated Top-Level Menu & Dashboard:** Real-time overview of issued keys, stats, and allocations accessible directly from the KEYMARIATOO sidebar menu.
2. **WooCommerce Product Integration:** Dedicated License Key settings tab inside the WooCommerce product editor with Stock Auto-Sync options.
3. **Customer Order Receipt & Email Display:** Clean display of assigned activation keys directly on customer order receipts, account pages, and transactional emails.

== Changelog ==

= 2.0.0 =
* Major Feature: Added dedicated top-level WordPress sidebar menu (`KEYMARIATOO`) positioned directly below WooCommerce.
* Major Feature: Added Stock Auto-Sync to automatically keep WooCommerce product inventory aligned with available license pools and single keys.
* Major Feature: Expanded Dynamic Pattern Generator engine with advanced tags (`{ALPHANUM:X}`, `{DIGITS:X}`, `{ALPHA:X}`, `{YYYY}`, `{MM}`, `{DD}`).
* UI/UX: Enhanced customer order receipt and email table rendering with email-safe HTML formatting.
* Compatibility: Full verification with WooCommerce High-Performance Order Storage (HPOS) and latest WordPress 6.7+.
* Security: Clean isolation between Free Core and commercial PRO add-on (`AES-256` database encryption at rest, bulk import, and quota enforcement).

= 1.3.0 =
* Enhancement: Added step-by-step Quick Start Guide for WooCommerce store owners.
* Security: Added explicit connect_token authentication guard for remote revocation endpoints.
* Enhancement: Added single_assigned key consumption logic after initial order fulfillment.
* Enhancement: Added official Requires at least 6.0 and Requires PHP 7.4 metadata headers.
* UI: Upgraded administrative confirmation flows to use accessible WordPress React Modals.
* Compliance: Renamed to KEYMARIATOO and prefixed all declarations (`mrtoo_` / `MRTOO_`) to ensure full compliance with WordPress.org guidelines.

= 1.2.0 =
* Initial stable release.

== Upgrade Notice ==

= 2.0.0 =
Major 2.0 release introducing Top-Level Sidebar Menu, Stock Auto-Sync, and Advanced Pattern Generator tags. Upgrade immediately for enhanced WooCommerce integration and UI improvements.

= 1.3.0 =
Major security upgrade and WooCommerce HPOS compatibility update. All users should upgrade immediately.
