=== Konserge Connector for UniSender ===
Contributors: konserge
Tags: unisender, forms, email marketing, divi
Requires at least: 4.7
Tested up to: 7.1
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect supported WordPress forms to UniSender. The first release supports Divi Contact Form.

== Description ==

Konserge Connector for UniSender is a lightweight WordPress integration that sends subscriptions from supported forms to the UniSender email marketing service. Version 1.0.0 supports Divi Contact Form.

The plugin provides:

* UniSender API-key settings and an explicit connection test.
* Manual retrieval and local caching of UniSender contact lists.
* Multiple Divi Contact Form connections identified by unique module CSS IDs.
* A target UniSender list for each connection.
* Email and optional Name field mapping.
* Optional server-side consent validation.
* Configurable subscription confirmation (Double Opt-In) behavior.
* A follow-up subscription action that preserves Divi's normal owner email, success message, and redirect behavior.

= Frontend behavior =

The plugin adds no frontend CSS or JavaScript and has no jQuery dependency. It adds no tracking, analytics, background polling, or cron jobs. It does not contact UniSender during ordinary page rendering. UniSender requests occur only after an explicit administrator action or a valid submission of a configured Divi Contact Form.

== Installation ==

1. Install the plugin through the WordPress Plugins screen, or upload the `konserge-connector-for-unisender` directory to `/wp-content/plugins/`.
2. Activate Konserge Connector for UniSender.
3. Open the Konserge Connector for UniSender settings page and enter your UniSender API key.
4. Use the connection test to verify access to the UniSender API.
5. Manually refresh the available UniSender contact lists so they are cached locally.
6. Open the Konserge Connector for UniSender integrations page.
7. Add a Divi Contact Form connection.
8. Assign a unique CSS ID to the Divi Contact Form module and enter the same ID in the connection.
9. Select the cached UniSender list that should receive subscriptions.
10. Confirm the Email field ID and, if needed, configure the optional Name field ID.
11. Configure a dedicated consent checkbox and enable server-side consent validation if required for the form.
12. Choose the required Double Opt-In mode and save the connection.
13. Submit a test form and verify the expected UniSender and Divi behavior.

The Divi Contact Form integration requires Divi. Konserge Connector for UniSender itself can be activated safely when Divi is not installed. The plugin does not create or automatically edit Divi forms; the administrator configures the form, CSS ID, fields, and consent content in Divi.

== External service ==

Konserge Connector for UniSender communicates with the external [UniSender service](https://www.unisender.com/). Use of that service is subject to the [UniSender Terms](https://www.unisender.com/ru/terms/) and [UniSender Privacy Notice](https://www.unisender.com/ru/privacy-notice/).

= Administrator actions =

When an administrator tests the API connection or manually refreshes UniSender lists, the plugin sends the stored UniSender API key to UniSender. A manual list refresh retrieves list IDs and titles from UniSender and caches them locally in the WordPress database with a cache timestamp.

= Form subscriptions =

When a visitor submits a configured Divi Contact Form and the plugin processes the subscription, it sends the following data to UniSender:

* The stored UniSender API key.
* The target UniSender list ID.
* The subscriber's email address.
* The subscriber's name when an optional Name field is configured and provided.
* The configured Double Opt-In setting.
* The fixed platform identifier `connectforunisender`.
* Required API parameters for request format and subscription overwrite behavior.

Subscriber email addresses and names are therefore transmitted to UniSender. The plugin does not maintain its own subscriber database and does not intentionally log submitted email addresses or names. UniSender list IDs and titles are cached locally. Ordinary page rendering does not contact UniSender.

== Privacy ==

The following plugin data is stored in the site's WordPress database:

* The UniSender API key.
* Cached UniSender list IDs, list titles, and the cache timestamp.
* Divi Contact Form connection mappings.
* Plugin legal settings, including configured URLs and default consent text.

When a configured subscription is processed, the subscriber's email address and optional name are sent to UniSender. The plugin does not intentionally store those submitted values as its own local subscriber records and does not intentionally log them.

The plugin adds no analytics, telemetry, or tracking. Deliberately uninstalling the plugin removes its plugin-owned options. Use of the plugin does not by itself make a site legally compliant; site owners remain responsible for their forms, consent choices, privacy information, and use of UniSender.

== Frequently Asked Questions ==

= Do I need a UniSender account and API key? =

Yes. A UniSender account and valid API key are required to test the connection, retrieve lists, and process subscriptions.

= Does the plugin work without Divi? =

The plugin can be activated safely without Divi. Its Divi Contact Form mapping and subscription functionality requires Divi.

= Which Divi integration is currently supported? =

Version 1.0.0 supports Divi Contact Form. It does not provide a Divi Email Optin service provider.

= Does it stop Divi from sending its normal owner email? =

No. The UniSender subscription runs as a follow-up action and does not change Divi's normal owner email, success message, or redirect behavior.

= Does the plugin load CSS or JavaScript on the frontend? =

No. The plugin adds no frontend CSS or JavaScript and has no jQuery dependency.

= Does it contact UniSender on every page view? =

No. UniSender is contacted only for explicit administrator connection/list actions and configured form subscriptions, not during ordinary page rendering.

= Where are UniSender lists stored? =

List IDs, titles, and a cache timestamp are stored in the site's WordPress database. Lists are refreshed only when an administrator requests it.

= What data is sent to UniSender? =

For a configured form subscription, the plugin sends the API key, target list ID, email address, optional name, Double Opt-In setting, fixed platform identifier, and required API parameters. See External service above for details.

= What happens when consent is required but not checked? =

The plugin stops before sending the subscription to UniSender. It does not change Divi's normal form behavior.

= Is Divi 5 supported? =

Divi 5 compatibility has not been verified and is not currently claimed.

== Changelog ==

= 1.0.0 =
* Added UniSender API-key settings and explicit connection testing.
* Added manual UniSender contact-list retrieval and local caching.
* Added validated subscription processing for email addresses and optional names.
* Added server-side consent checks and configurable Double Opt-In behavior.
* Added multiple Divi Contact Form mappings based on explicit module CSS IDs.
* Added release hardening for API identification, input handling, and uninstall cleanup.
* Added WordPress.org-compliant identifiers and a safe migration for existing settings.
