=== SendDuo ===
Contributors: sendduo
Tags: abandoned cart, email marketing, newsletter, signup form, woocommerce
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Abandoned cart emails and signup forms for your WooCommerce shop, sent with SendDuo.

== Description ==

Connect your shop to your SendDuo account and:

* email subscribers who leave items in their cart, with their cart in the email and a link that puts it back,
* add signup forms and popups in your brand colors, with an optional welcome code,
* add a newsletter box at checkout (never ticked in advance).

The plugin only sends information to SendDuo. It never lets SendDuo change your store, its products or its orders. It adds one small deferred script to your pages (on checkout, a smaller one that notes the email typed and the newsletter box), and never makes your shoppers wait on SendDuo: events are queued on your site and sent in the background.

== Installation ==

1. Upload the plugin and activate it (WooCommerce must be active).
2. Go to WooCommerce → SendDuo and click Connect to SendDuo.
3. Approve the connection in SendDuo.
4. In SendDuo, turn on the Abandoned cart automation and create your forms.

== Frequently Asked Questions ==

= Does SendDuo change my store? =

No. The plugin only sends information to SendDuo. The cart link in an email rebuilds that shopper's own cart, the same way WooCommerce's add-to-cart links do.

= Who gets abandoned cart emails? =

Only people who subscribed to your emails (through a form, your checkout box or your own list).

= My site sends a Content-Security-Policy header =

Forms need three things from the policy:

* connect-src: allow https://sendduo.com (forms load from and submit to SendDuo).
* script-src: allow inline scripts, or the nonce your security plugin adds (the plugin passes its settings to its scripts with a small inline script; the scripts themselves load from your own site).
* style-src: allow inline styles (each form brings its styles inside its own shadow root, and the form placeholder has a style attribute).

== External services ==

This plugin connects to SendDuo (https://sendduo.com), an email marketing service run by SendDuo. It is needed to send your abandoned cart emails and to show your SendDuo signup forms.

What is sent, when, and why:

* Connecting: when you click Connect to SendDuo, your browser goes to SendDuo to approve the connection (your site's address and admin address, the plugin and WooCommerce versions), and your server then fetches the connection keys from SendDuo.
* Carts and orders (only after you connect): when a shopper's cart changes, an email is typed at checkout, the newsletter box changes or an order is paid or put on hold, your server sends SendDuo the cart's contents (product names, quantities, prices, pictures and links), the email address the shopper is logged in with or types at checkout, whether they ticked the newsletter box (and its label, kept as proof of consent), the checkout page address (without its query) and the order's number. This is sent in the background, so SendDuo can email subscribed shoppers about their cart and stop when they order. An email typed without ticking the box is not added to your list.
* Forms (only after you connect, and while "Show my SendDuo forms" is on): on each page view where a form can show, the visitor's browser loads your forms from SendDuo, so SendDuo receives the visitor's IP address and browser details like any web request. A sign-up goes from the visitor's browser to SendDuo: the email address, the first name if the form asks for it, the page address and the visitor's IP address, kept by SendDuo as proof of consent.
* Daily (only after you connect): the plugin version and your WordPress and WooCommerce versions.
* Updates (only the zip downloaded from SendDuo, not the WordPress.org version): every 12 hours, also before you connect, WordPress asks SendDuo whether a newer version of the plugin exists. The request carries the plugin version, and WordPress's usual request details (your site's address in the user agent, your server's IP address).

SendDuo uses this data only to provide the service to you (the shop): sending your emails, keeping consent records, and showing your forms. SendDuo never changes your store.

SendDuo terms of use: https://sendduo.com/terms
SendDuo privacy policy: https://sendduo.com/privacy

== Privacy ==

The plugin sets one cookie, sd_id (30 days), when a shopper arrives from a SendDuo email or signs up through a form, so their cart can be matched to them; it respects the WP Consent API. It adds suggested text to Settings → Privacy → Policy guide.

== Changelog ==

= 1.0.6 =
* The connect reminder appears only on the Dashboard and Plugins screens; setup notices only on the Plugins screen.

= 1.0.5 =
* Shared form script update (signed-in shoppers on Shopify stores); no change for WordPress shops.

= 1.0.4 =
* Forms stay visible on themes that hide empty elements.

= 1.0.3 =
* Inline forms also appear when a page builder adds the form's spot after the page loads.

= 1.0.2 =
* The plugin is now named SendDuo.
* Database queries pass the plugin's table names as identifiers.

= 1.0.1 =
* Until the shop is connected, a notice across the WordPress admin offers Connect to SendDuo (each user can dismiss it).

= 1.0.0 =
* First release: connection, abandoned cart events, cart restore links, checkout newsletter box, signup forms and popups.

== Upgrade Notice ==

= 1.0.6 =
Fewer admin notices: shown only where they are relevant.

= 1.0.5 =
Shared form script update.

= 1.0.4 =
Forms stay visible on themes that hide empty elements.

= 1.0.3 =
Inline forms appear in spots added after the page loads.

= 1.0.2 =
Renamed to SendDuo; safer database queries.

= 1.0.1 =
Shows a Connect to SendDuo notice until the shop is connected.

= 1.0.0 =
First release.
