=== RogalMail for WooCommerce ===
Contributors: rogalmarketing
Tags: email marketing, woocommerce, abandoned cart, newsletter, rogalmail
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.4.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects your WooCommerce store to RogalMail: customer sync, abandoned cart automations, product sync, and embeddable signup forms.

== Description ==

RogalMail for WooCommerce wires your store into your RogalMail account (rogalmail.com):

* **Customer sync.** A clear, unticked opt-in at checkout and on registration. Customers who tick it are added to RogalMail (and to your default list, if you set one) with their name and email.
* **Abandoned cart.** When a shopper reaches checkout and leaves without buying, the cart — items, prices, total, and a checkout link — is reported to RogalMail, where your abandoned cart automation takes over. When the order completes, a purchase event closes the cart flow, so nobody gets a recovery email for a cart they already paid for.
* **Product sync.** Your catalog stays matched to RogalMail's product library, so the email editor's product block always shows current names, prices, and images.
* **Signup forms anywhere.** Drop `[rogalmail_form id="123"]` into any page, post, or widget to embed one of your RogalMail hosted signup forms.

Setup lives under WooCommerce → Settings → RogalMail. You need two keys from your RogalMail account: an API key (Integrations) and the event key (shown on the store connection card of any automation). The settings page has a Test connection button and shows a short log of recent activity.

== Installation ==

1. Upload the plugin folder (or the zip, via Plugins → Add New → Upload) and activate it.
2. Go to WooCommerce → Settings → RogalMail.
3. Paste your API key and event key, choose what to sync, and Save.
4. Click Test connection. Then click Sync products now for a first catalog sync.

== Frequently Asked Questions ==

= Does this slow down my checkout? =
No. Sync calls happen after orders and accounts are created, with a short timeout, and every failure is written to the plugin log on the settings page instead of touching the shopper's request.

= When is a cart reported? =
Once per cart state. If the shopper changes what is in the cart, the updated cart is reported; an unchanged cart never fires twice. A completed purchase always closes the open cart flow on the RogalMail side.

= Where does the signup form shortcode get its design? =
The form is hosted by RogalMail and designed in the RogalMail form builder; the shortcode embeds it exactly as the portal's Share snippet does.

== Changelog ==

= 1.4.0 =
* Purchase events now include the order's line items, powering Best-selling product feeds in RogalMail emails.

= 1.3.0 =
* Product sync now also sends each product's short description and its regular (pre-sale) price, so email product blocks can show descriptions and a struck-through old price. Re-run Sync products after updating to fill them in.

= 1.2.0 =
* One key now does everything. The plugin used to ask for two keys with two different names (an API key and an event key) collected from two different pages in RogalMail. The Event key field is gone: your API key also authenticates store events, so there is a single field and a single key to paste. Stores already connected with an event key keep working untouched.
* The settings page now shows a standing connection status beside the Test connection and Sync products buttons: connected or not, when the last test passed and how many contacts the account holds, when products last synced, and when the last store event was sent.

= 1.1.0 =
* New: browse abandonment tracking. When a shopper we can identify views a product and does not buy, the view is reported to RogalMail (once per product per visit, sent in the background so product pages never slow down). Store staff are never tracked. There is a toggle for it in the settings.

= 1.0.2 =
* Updates now arrive through WordPress itself: the plugin checks RogalMail for new versions, and updates appear on the Plugins page and under Dashboard, Updates, ready to install with the normal Update button.
* Added a RogalMail entry to the WooCommerce menu that goes straight to the settings.

= 1.0.1 =
* Declared compatibility with WooCommerce HPOS (custom order tables) and the cart/checkout blocks — the plugin only ever reads orders through WooCommerce's own order objects.
* Added a Settings link to the plugin's row on the Plugins page (the settings live under WooCommerce, Settings, RogalMail).

= 1.0.0 =
* Initial release: customer sync with checkout/registration opt-in, abandoned cart + purchase events, product sync, and the rogalmail_form shortcode.
