=== MailEngine Pro - WordPress & WooCommerce Bridge ===
Contributors: mailengine
Tags: email marketing, woocommerce, subscribers, auto provision, newsletter, product filter
Requires at least: 5.2
Tested up to: 6.7
Stable tag: 2.2.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Seamlessly bridge WordPress and WooCommerce with MailEngine Pro. Auto-provisions customer accounts for specific email marketing plans upon WooCommerce checkout and syncs newsletter subscribers programmatically.

== Description ==

MailEngine Pro Bridge connects your WordPress and WooCommerce store with your self-hosted MailEngine Pro platform.

Key Features:
* **Specific Product Provisioning:** Choose whether all store products or only specific Product IDs / Variation IDs / SKUs trigger account creation. Prevents unrelated store orders (merchandise, clothing, physical items) from creating email accounts.
* **Automated Account Provisioning:** Automatically provisions client accounts with monthly sending credits when customers buy subscription or one-time email plans.
* **WooCommerce Checkout Opt-In:** Adds an opt-in checkbox to the checkout page and pushes opt-in emails directly to your selected subscriber lists.
* **HMAC Signature Security:** Secures all webhook transmissions with HMAC SHA-256 signatures.

== Installation ==

1. In your WordPress Admin, go to **Plugins > Add New > Upload Plugin**.
2. Select the `mailengine-wp-bridge.zip` file and click **Install Now**.
3. Click **Activate Plugin**.
4. Go to **Settings > MailEngine Bridge** in your WordPress dashboard.
5. Enter your MailEngine Provisioning Webhook URL and Subscriber Sync URL.
6. Under "Specific Product IDs or SKUs", enter the comma-separated list of plan IDs or SKUs that should trigger account provisioning (e.g. `PRO-50K, STARTER-10K, 1082`).
7. Click **Save Settings & Verify Connection**.

== Frequently Asked Questions ==

= How do I restrict account creation to only my email marketing packages? =
In Settings > MailEngine Bridge, set "Target Products for Provisioning" to "Only Specific Products or SKUs" and enter your product IDs or SKUs. Any order that does not contain one of these products will be safely ignored without provisioning an account.

= Does this work without WooCommerce? =
Yes! If WooCommerce is not active, you can still use the subscriber sync and webhook integrations.

== Changelog ==

= 2.2.0 =
* Added granular Product Filter: choose specific WooCommerce Product IDs, Variation IDs, or SKUs to trigger account provisioning.
* Safely skips orders that do not contain eligible provisioning products.
* Added detailed WooCommerce order notes for skipped vs. provisioned orders.

= 2.1.0 =
* Initial public release with WooCommerce 8+ compatibility and HMAC validation.

