=== Meser10 Connect ===
Contributors: meser10
Tags: contact form 7, elementor, wpforms, fluent forms, email marketing
Requires at least: 5.3
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.2.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send Contact Form 7, Elementor Pro, WPForms and Fluent Forms submissions straight into your Meser 10 contact lists, with per-form field mapping.

== Description ==

Meser 10 Connect links your WordPress forms to your [Meser 10](https://www.meser10.co.il/) account. When a visitor submits a connected form, the plugin creates or updates that person as a contact on the mailing list you choose - no CSV exports, no manual copying.

One plugin covers both supported form builders, sharing a single API key and a single field-mapping model:

* **Contact Form 7** - adds a "Meser 10" tab inside the form editor.
* **Elementor Pro Forms** - adds "Meser 10" as an After Submit action.

= Features =

* Per-form on/off switch - connect only the forms you want.
* Choose a different Meser 10 contact list per form.
* Map any form field to a Meser 10 contact field: email, phone, first name, last name, address, city, zipcode, and five custom fields.
* Authenticates with a single API key from your Meser 10 account. No usernames or passwords are stored in the site.
* All traffic runs over HTTPS.
* Optional debug log, stored in the database and visible only to administrators. The API key is redacted before anything is written to it.
* A form submission is never blocked by an API problem - if Meser 10 cannot be reached, the form's own email still sends.

= External service =

This plugin sends form data to Meser 10, an email and SMS marketing platform operated by Mesereser Ltd. It is not usable without a Meser 10 account.

**What is sent, and when:** when a visitor submits a form you have explicitly connected in the plugin settings, the plugin sends the fields you mapped for that form - which may include the visitor's email address, phone number, name, and postal address - together with your API key and the target contact list name. Nothing is transmitted for forms you have not connected, and nothing is transmitted while no API key is saved.

**Where it is sent:** to the Meser 10 JSON API at `https://heb.mesereser.com/Services/JsonServices.aspx`, over HTTPS.

Please make sure your site's own privacy policy tells your visitors that their submissions are transferred to Meser 10, and that you have a lawful basis for sending them marketing messages.

* Meser 10 terms of use: https://www.meser10.co.il/terms/
* Meser 10 privacy policy: https://www.meser10.co.il/privacy/

== Installation ==

1. Install and activate the plugin.
2. Go to **Meser 10** in the WordPress admin menu.
3. Paste the API key from your Meser 10 account (User Settings screen) and save.
4. Connect a form:
   * *Contact Form 7*: open the form, go to the **Meser 10** tab, tick **Enable**, enter the contact list name, and map your fields.
   * *Elementor Pro Forms*: edit the form widget, open **Actions After Submit**, add **Meser 10**, then fill in the contact list name and map each field by its Field ID (found under **Advanced** in the field's settings).
   * *WPForms*: open the form builder, go to **Settings**, and choose the **Meser 10** section.
   * *Fluent Forms*: go to **Meser 10 &rarr; Fluent Forms** in the admin menu, pick your form, and map its fields there.

== Frequently Asked Questions ==

= Which form plugins are supported? =

Contact Form 7, Elementor Pro Forms, WPForms (Lite and Pro) and Fluent Forms. Each integration is loaded only when that plugin is active, so having just one of them installed is fine.

= Do I need a Meser 10 account? =

Yes. The plugin is a connector for an existing Meser 10 account and does nothing on its own.

= Where do I find my API key? =

In your Meser 10 account, under the user settings screen. If you cannot see it, contact Meser 10 support.

= Which form plugins are supported? =

Contact Form 7 and Elementor Pro Forms. The free version of Elementor does not include the Forms widget, so Elementor Pro is required for that integration.

= Will a Meser 10 error stop my form from working? =

No. The API call is wrapped so that any failure is logged and ignored - the form's own confirmation email is sent as usual.

= Is the API key exposed anywhere? =

No. It is stored as a WordPress option, readable only by users with the `manage_options` capability, and it is redacted out of the debug log before the log is written.

= What happens to my settings if I delete the plugin? =

Deleting the plugin (not merely deactivating it) removes the API key, the debug log, and all per-form settings it created.

= What happened to Pojo Forms support? =

It was removed in 1.1.0. The Pojo Forms plugin was permanently closed on WordPress.org at its author's request in December 2024 and can no longer be installed, so the integration could not be verified against real code.

== Screenshots ==

1. The settings screen: paste the API key from your Meser 10 account, and see where each supported form plugin is configured.
2. Contact Form 7: a "Meser 10" tab is added to the form editor, where you choose the contact list and map each field.
3. WPForms: the mapping sits in a "Meser 10" section inside the form builder's Settings panel, so it travels with the form.

== Changelog ==

= 1.2.0 =
* Added WPForms support. The settings sit in a "Meser 10" section inside the WPForms builder's Settings panel and travel with the form, so exporting or duplicating a form carries its mapping along.
* Added Fluent Forms support. Its mapping lives on a dedicated "Fluent Forms" screen under the Meser 10 menu rather than inside Fluent's own builder, because Fluent's integration framework has changed shape between major versions and reading the form list is the stable part.
* Both integrations load only when their form plugin is active, and a failure talking to Meser 10 still cannot break the form's own confirmation or notification email.

= 1.1.1 =
* Removed the "Test connection" button. It could not tell an invalid API key apart from a rejected payload, so a working key was reported as a failed test along with the raw error text from the server. Rather than guess at the meaning of undocumented error codes, the button was taken out; saving a key and submitting a form is the reliable check.

= 1.1.0 =
* Removed Pojo Forms support: the plugin was permanently closed on WordPress.org (author request, December 15 2024) and is no longer installable, so the integration could not be verified against real code. Contact Form 7 and Elementor Pro Forms are unaffected.

= 1.0.1 =
* Fixed a critical Contact Form 7 bug: field mapping reverted to "not mapped" immediately after saving, because `sanitize_key()` lowercased the internal field names (`field_EMail` became `field_email`) and broke the match against Meser 10's case-sensitive field names. Forms appeared to save correctly but stored no mapping at all, so no subscriber reached Meser 10 through Contact Form 7.
* Added a dedicated regression test for that scenario.

= 1.0.0 =
* First release. Replaces the older Contact Form 7 only plugin and adds Elementor Pro Forms support.

== Upgrade Notice ==

= 1.0.1 =
Fixes a bug that silently prevented Contact Form 7 submissions from reaching Meser 10. Upgrading is strongly recommended.
