=== 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 four form builders. They share a single API key, a single field-mapping model and a single debug log, so you set the connection up once no matter how many builders the site uses.

= Supported form builders =

**Contact Form 7**

The oldest and most widely installed form plugin for WordPress. A form is written as a short tag template, and every field carries a name such as `your-email` or `your-name`.

After activating Meser 10 Connect, open any form and you will find a new **Meser 10** tab beside Form, Mail and Messages. Tick **Enable**, type the name of the contact list the entries should land in, and map each Meser 10 contact field to the field name used in your template. The mapping is stored with the form itself, so duplicating the form carries it along.

**Elementor Pro Forms**

The form widget built into Elementor Pro. Forms are assembled visually on the page, and anything that should happen after a submission is added under **Actions After Submit**.

Edit the form widget, open **Actions After Submit**, and add **Meser 10** to the list. A Meser 10 panel appears underneath with the contact list name and the field mapping. Elementor identifies fields by **Field ID**, which you will find under **Advanced** in each field's settings, so enter those IDs rather than the visible labels. Because the action runs alongside Elementor's own email action, both keep working.

**WPForms**

A drag and drop builder, available as WPForms Lite and WPForms Pro. Both work with this plugin.

Open a form in the builder and go to **Settings**. A **Meser 10** section sits with the other setting groups. Turn it on, choose the contact list, and map the fields. The settings are saved inside the form, which means exporting a form or duplicating it carries the Meser 10 mapping with it.

**Fluent Forms**

A drag and drop builder known for keeping the front end light.

Its mapping lives on its own screen at **Meser 10 &rarr; Fluent Forms** in the admin menu rather than inside Fluent's own builder. Pick the form from the list, then set the contact list and the field mapping. The reason for the separate screen is practical: Fluent's integration framework has changed shape between major versions, while reading the list of forms and their fields has stayed stable, so mapping from outside the builder keeps working across upgrades.

= How the mapping works =

Every integration asks the same two questions: which Meser 10 contact list should receive the entry, and which form field feeds which contact field. The contact fields available are email, phone, first name, last name, address, city, zipcode, and five custom fields you can use for anything else.

Only the email field is required. Anything you leave unmapped is simply not sent. A field that is empty on a given submission is skipped rather than overwriting an existing value on a contact who already exists.

Each integration is loaded only when its form plugin is active, so installing just one builder is perfectly fine, and adding a second one later needs no extra configuration beyond mapping that builder's forms.

= 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.

= Where your data goes =

Form submissions are sent to your Meser 10 account and nowhere else. The "External services" section below lists exactly what is sent, when, and to which endpoint.

== External services ==

This plugin connects to Meser 10, an email and SMS marketing platform operated by Mesereser Ltd. The plugin is not usable without a Meser 10 account, and nothing leaves your site until you save an API key and connect a form.

**What the service is used for:** creating or updating the person who submitted one of your connected forms as a contact on your Meser 10 mailing list.

**What data is sent, and when:** at the moment 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, first and last name, and postal address, together with your Meser 10 API key and the name of the target contact list. Nothing is sent for forms you have not connected, nothing is sent while no API key is saved, and no data is sent on any other event.

**Where it is sent:** to the Meser 10 JSON API at `https://heb.mesereser.com/Services/JsonServices.aspx` over HTTPS. This is the only external endpoint the plugin contacts.

This service is provided by Mesereser Ltd:

* Terms of use: https://www.meser10.co.il/terms/
* Privacy policy: https://www.meser10.co.il/privacy/

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.

== 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. Note that the free version of Elementor does not include the Forms widget, so Elementor Pro is required for that integration.

= 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.

= 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.
