=== StepMailer Connector ===
Contributors: stepmailer
Tags: stepmailer, contact form 7, email marketing, subscribers, newsletter
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.3.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Send Contact Form 7 submissions to StepMailer subscriber registration and unsubscribe forms.

== Description ==

StepMailer Connector links Contact Form 7 forms with StepMailer.

You can create multiple mappings and choose whether each mapping registers subscribers or handles unsubscribe requests. Each mapping stores its own StepMailer API URL, integration secret, Contact Form 7 form, email field, name field, company field, custom field mappings, and optional subscription consent field.

Main features:

* Connect multiple Contact Form 7 forms to StepMailer.
* Choose subscriber registration or unsubscribe mode per mapping.
* Map email address, name, company, and custom fields.
* Send optional subscription consent state from a Contact Form 7 acceptance field.
* Keep the last send status and HTTP response visible in the WordPress admin.

This plugin requires an active StepMailer account and Contact Form 7.

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/stepmailer-connector` directory, or install the plugin ZIP from the WordPress admin plugin upload screen.
2. Activate the plugin through the Plugins screen in WordPress.
3. Make sure Contact Form 7 is installed and activated.
4. Open Settings > StepMailer Integration.
5. Add a mapping and choose subscriber registration or unsubscribe mode.
6. Select the Contact Form 7 form to connect.
7. Copy the StepMailer API URL and integration secret from the StepMailer form details screen.
8. Set the Contact Form 7 field names for email address, name, company, and any custom fields.

== Frequently Asked Questions ==

= Does this plugin require Contact Form 7? =

Yes. The plugin sends data after a Contact Form 7 submission succeeds.

= Can I connect more than one form? =

Yes. You can create multiple mappings and configure each mapping separately.

= Can I use this for unsubscribe forms? =

Yes. Choose unsubscribe mode for mappings that should remove or stop a subscriber in StepMailer.

= How do custom fields work? =

Enter one mapping per line in the format `StepMailer field name=Contact Form 7 field name`.

Example:

`Inquiry details=your-message`

= How does subscription consent work? =

For subscriber registration mappings, you can enter the name of a Contact Form 7 acceptance field. If the field is unchecked, new subscribers are sent to StepMailer as not subscribed. If an existing subscriber is already subscribed, StepMailer keeps that subscribed state.

Example Contact Form 7 tag:

`[acceptance stepmailer-consent optional] I agree to receive email updates. [/acceptance]`

In the plugin settings, enter `stepmailer-consent`.

== Changelog ==

= 1.3.3 =

* Move admin JavaScript to an enqueued asset.
* Rename the stored option to use the `stepmailer_connector_` prefix.

= 1.3.2 =

* Send `subscriptionConsent` as `null` when no consent field is configured.
* Keep already subscribed StepMailer subscribers subscribed when a later Contact Form 7 submission has no explicit consent setting.
* Update admin and documentation text for subscription consent behavior.

= 1.3.1 =

* Add unsubscribe mode for Contact Form 7 mappings.

= 1.3.0 =

* Add custom field mappings and last send status display.

== Upgrade Notice ==

= 1.3.3 =

Updates plugin internals for WordPress.org review compatibility.

= 1.3.2 =

Updates subscription consent handling for Contact Form 7 integrations.
