=== Shogun Product Update Notifier for WooCommerce ===
Contributors: sankalpbhgt
Tags: woocommerce, digital products, email notification, product updates
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
WC requires at least: 5.0
WC tested up to: 8.8
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Notify past buyers when a digital product is updated.

== Description ==

By default, WooCommerce does not notify your customers when you update a downloadable file or digital product. The **Digital Product Update Notifier for WooCommerce** solves this by letting you safely queue and broadcast update emails to past buyers with a single click.

Whether you have 10 past buyers or 10,000, this plugin is built for performance. Instead of crashing your server by sending emails sequentially on page save, it uses WooCommerce's built-in Action Scheduler to process emails efficiently in the background.

= Key Features =
* **Safe Background Processing:** Uses Action Scheduler to queue emails, preventing server timeouts and crashes on large stores.
* **Native WooCommerce Emails:** Emails are sent using your store's global WooCommerce sender details and inherit your native store styling (header, logo, footer).
* **Customizable Templates:** Edit the email subject, heading, and body content directly from the WordPress admin area.
* **Dynamic Tags:** Personalize emails using `{product_name}` and `{account_url}` variables.
* **Test Email Tool:** Send a preview email to yourself before blasting your customer list.
* **Secure Broadcast Logs:** Keep track of queue initializations right from your dashboard.

= How to use? =
1. Go to **WooCommerce > Update Notifier** to configure your email template.
2. When editing any Downloadable WooCommerce product, check the **“Notify Past Buyers”** box before clicking “Update” to trigger the broadcast.

== Installation ==

1. Upload the `shogun-product-update-notifier` folder to the `/wp-content/plugins/` directory, or install it directly through the WordPress plugins screen via the `.zip` file.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **WooCommerce > Update Notifier** to configure your email template.
4. When editing any Downloadable WooCommerce product, check the "Notify Past Buyers" box before clicking "Update" to trigger the broadcast.

== Frequently Asked Questions ==

= How do I know if the emails are sending? =
When you trigger an update, the plugin logs the queue initialization in **WooCommerce > Update Logs**. Because it uses background processing, the actual emails are processed by WooCommerce over the next few minutes. You can monitor the real-time progress by going to **WooCommerce > Status > Scheduled Actions** and looking for the `shogun_pun_process_single_email` hook.

= Where do the "From Name" and "From Email" come from? =
To ensure maximum compatibility and brand consistency, the plugin automatically uses the global sender settings you have configured under **WooCommerce > Settings > Emails**.

= Which tags are available? =
Currently, you can use `{product_name}` to output the title of the updated product, and `{account_url}` to output the link to your store's "My Account" page so users can log in and download their new files.

= Does this work for physical products? =
No. For safety and logic reasons, the "Notify Past Buyers" checkbox will only appear on products that have the "Downloadable" checkbox enabled. 

== Screenshots ==

1. Settings page
2. Single product page
3. Broadcast logs

== Changelog ==

= 1.0.0 =
* Initial release.