=== Greenbubble Sync ===
Contributors: greenbubblecrm
Tags: woocommerce, whatsapp, webhook, automation, notifications
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect WooCommerce to Greenbubble WhatsApp notifications using secure native WooCommerce webhooks.

== Description ==

Greenbubble Sync creates and manages native WooCommerce webhooks for selected order, customer, and product events.

Every payload is signed by WooCommerce with HMAC-SHA256 using the Secret generated by Greenbubble. WooCommerce retains its normal background delivery, retry, and webhook logging behavior.

Features:

* Guided Greenbubble Delivery URL and Secret setup.
* Native order and customer event webhooks.
* Signed, non-processing connection test.
* Managed webhook status and direct links to WooCommerce webhook records.
* High-Performance Order Storage (HPOS) compatibility declaration.
* Clean uninstall that removes webhooks created by the plugin.

== Installation ==

1. Upload and activate the plugin in WordPress.
2. Ensure WooCommerce is installed and active.
3. In Greenbubble, open Event Notifications and create a WooCommerce webhook.
4. Copy its Delivery URL and Secret.
5. In WordPress, open WooCommerce > Greenbubble.
6. Paste the Delivery URL and Secret, select events, and click Save and synchronize.
7. Click Test connection.
8. Trigger a real event so Greenbubble can capture its payload.
9. Return to Map template in Greenbubble and choose the required Send via sender.
10. Select one of that sender's approved templates and map its variables.

Before mapping, connect at least one WhatsApp sender in the event's Greenbubble workspace. Send via can use a connected Cloud API sender or a connected Scan Device session. Cloud API sends the template through Meta. Scan Device renders the selected Greenbubble template through its linked WhatsApp session and is not a Meta-approved template send.

== Frequently Asked Questions ==

= Does this replace WooCommerce webhooks? =

No. It creates and manages standard WooCommerce webhooks so the native delivery queue, retries, signatures, and logs remain available.

= Where can I inspect deliveries? =

Open WooCommerce > Status > Logs or follow the webhook links shown on the Greenbubble settings page.

= Is the Secret sent inside webhook payloads? =

No. WooCommerce uses it only to calculate the X-WC-Webhook-Signature HMAC header.

== Screenshots ==

1. Connection settings for the Greenbubble Delivery URL, Secret, and WooCommerce events.
2. Signed connection test and managed webhook status, with links to native WooCommerce webhooks.

== Changelog ==

= 1.0.0 =

* Initial release.
