=== Stock Guardian Pro ===
Contributors: xtremecode
Requires at least: 6.2
Tested up to: 6.8
Stable tag: 0.2.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: woocommerce, inventory, stock, email, notifications

Premium WooCommerce plugin for smart low stock notifications with configurable thresholds, multiple alerts, and centralized dashboard.

== Description ==

Stock Guardian Pro is a premium WooCommerce plugin designed to help store owners maintain optimal inventory levels by sending intelligent low stock notifications. The plugin monitors product and variation stock levels in real-time and automatically alerts administrators when items fall below customizable thresholds.

The plugin offers a comprehensive solution for inventory management with both global and per-product threshold settings. Store administrators can configure default low stock thresholds that apply site-wide, while also having the flexibility to set custom thresholds for individual products or variations directly from the WooCommerce product edit screen.

Key capabilities include email notifications with customizable subject lines and message templates, optional Telegram integration for instant mobile alerts, and a professional admin dashboard that provides real-time metrics, notification history, and centralized management of all monitored products. The plugin also includes a read-only REST API endpoint for external integrations and third-party systems.

Stock Guardian Pro is built following WordPress coding standards, uses strict PHP typing, and includes comprehensive error handling. It integrates seamlessly with WooCommerce's existing inventory management system and does not interfere with core WooCommerce functionality. The plugin is production-ready, fully documented, and suitable for stores of any size.

== Key Features ==

* Pro dashboard with real-time metrics (notifications, custom thresholds, monitored products).
* Global threshold plus per-product/per-variation overrides stored in a dedicated table.
* Customizable email subject and message directly from the settings UI (with hook `woolsn_notification_sent` for developers).
* Optional Telegram alerts via bot token + chat ID.
* Notification history saved in a dedicated table and displayed in the admin area.
* Read-only REST endpoint (`/wp-json/woolsn/v1/threshold/<product_id>/<variation_id>`) for external integrations.

== Installation ==

1. Upload the `stock-guardian-pro` folder to `wp-content/plugins/`.
2. Activate the plugin from **Plugins > Installed Plugins**.
3. Navigate to **WooCommerce > Stock Guardian** to view the dashboard, configure threshold, email, templates, and Telegram integrations.
4. Set custom thresholds for individual products or variations from the **Inventory** tab within the product edit screen (field "Low stock threshold override").
5. Ensure products have stock management enabled in WooCommerce.

== Updates via Envato Market ==

1. Download and install the official **Envato Market** plugin from build.envato.com.
2. Access the Envato Market plugin and add your Envato *personal token* to link your account.
3. After connection, **Stock Guardian Pro** will appear in the Envato Market dashboard and will automatically receive future updates.

== Requirements ==

* WordPress 6.2+
* WooCommerce 6.0.0+
* PHP 7.4+

== Support ==

Open a ticket through the Envato system or write to support@xtremecode.eu attaching WooCommerce logs.

