=== Suace Order & Stock Alerts for WooCommerce ===
Contributors: suaceplugins
Tags: woocommerce, orders, stock, inventory, email
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send lightweight email alerts for new WooCommerce orders, low stock, and out of stock products.

== Description ==

Suace Order & Stock Alerts for WooCommerce is a lightweight plugin that helps store owners receive simple email alerts for important WooCommerce events.

The plugin sends alerts for:

* New WooCommerce orders.
* Products that reach the configured low stock threshold.
* Products that become out of stock.

The admin screen includes:

* Notification email address setting.
* Low stock threshold setting.
* Send Test Email button.
* Simple log screen for email results.

The plugin uses WordPress email delivery through `wp_mail()` and does not connect to external APIs.

WooCommerce 7.0 or newer is recommended. If WooCommerce is not active, the plugin shows an admin notice and does not run WooCommerce alert hooks.

== Installation ==

1. Upload the `suace-order-stock-alerts` folder to `/wp-content/plugins/`, or upload the plugin ZIP from the WordPress Plugins screen.
2. Activate the plugin through the Plugins screen in WordPress.
3. Make sure WooCommerce is installed and active.
4. Go to Settings > Order & Stock Alerts.
5. Enter the notification email address and low stock threshold.
6. Click Send Test Email to confirm email delivery.

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes. WooCommerce is required for order and stock alerts. If WooCommerce is not active, the plugin shows an admin notice and avoids fatal errors.

= Does this plugin use external services? =

No. The plugin sends email through WordPress `wp_mail()` and does not call external APIs.

= Does this plugin support HPOS? =

The plugin uses WooCommerce order hooks, `wc_get_order()`, and WooCommerce CRUD methods. It does not query `wp_posts` or `wp_postmeta` for orders.

= Why did my test email not arrive? =

The plugin uses WordPress email delivery. If the test email fails or does not arrive, check your hosting mail setup, SMTP configuration, or local mail catcher.

= Will low stock alerts repeat constantly for the same product? =

No. The plugin stores a small product stock alert state so the same low stock alert is not sent repeatedly while the product remains in the same stock state.

== Screenshots ==

1. Settings screen with notification email address, low stock threshold, and Send Test Email button.
2. Log screen showing test email, new order, low stock, and out of stock email results.

== Changelog ==

= 1.0.0 =

* Initial WordPress.org-ready release.
* Added new order email alerts.
* Added low stock email alerts.
* Added out of stock email alerts.
* Added Send Test Email button.
* Added notification email and low stock threshold settings.
* Added simple email result log screen.
