Skip to content

Repository files navigation

=== Bricksforms Marketing Integrations ===
Contributors: jcwebtech
Tags: bricks builder, mailchimp, emailoctopus, wordpress forms, email marketing
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 8.0
Stable tag: 2.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect Bricks Builder forms to marketing & CRM platforms (Mailchimp, EmailOctopus, and more) with per-form field mapping and encrypted credentials.

== Description ==
Bricksforms Marketing Integrations extends Bricks Builder forms with marketing and CRM providers, offering more control than the built-in actions:

✔ Multiple providers, each added as its own Bricks form action
✔ Per-form field mapping (email, first name, last name)
✔ Tags and subscriber status control
✔ Update existing subscribers
✔ API keys stored encrypted at rest
✔ Custom success and error messages
✔ Optional debug logging

Bundled providers in this version:

* **Mailchimp** – Marketing API v3.0 (upsert list members, tags, merge fields)
* **EmailOctopus** – API v2 (upsert contacts, custom field tags, status)

The architecture is provider-based, so additional platforms (MailerLite, HubSpot, Brevo, ActiveCampaign, ConvertKit) can be added without changing the core. Developers can register their own provider via the `bmi/providers` filter.

Requires Bricks Builder 1.12.2 or later.

== Installation ==
1. Upload the plugin to `/wp-content/plugins/` and activate it.
2. Go to **Settings > Bricksforms Marketing Integrations** and enter the API key(s) for the provider(s) you want to use.
3. Edit a **Bricks Form** element, open **Actions**, and add the provider (e.g. "Mailchimp" or "EmailOctopus").
4. In the provider's settings group, enter the list/audience ID and map the form fields.

For maximum security you may define a dedicated encryption key in `wp-config.php`:

`define( 'BMI_ENCRYPTION_KEY', 'your-long-random-string' );`

== Frequently Asked Questions ==

= Where do I find my Mailchimp API key? =
In Mailchimp under **Account > Extras > API keys**. The datacenter is detected automatically from the key suffix.

= Where do I find my EmailOctopus API key? =
In EmailOctopus under **Account settings > Integrations & API**. Create a v2 API key.

= Are API keys stored securely? =
Yes. Keys are encrypted with AES-256-CBC using a dedicated key (auto-generated, or the `BMI_ENCRYPTION_KEY` constant if defined). If a stored key can't be decrypted, the plugin shows an admin notice instead of failing silently.

= My Mailchimp submissions fail with "Your merge fields were invalid." =
This is a Mailchimp audience setting, not a plugin error. If your audience has an **Address** field, Mailchimp's API validates it as a *complete* address on every subscribe and rejects the submission when the address is missing or partial — even when the field is not marked required. This plugin maps email, first name, last name, and tags, so it does not send an address. To fix it, either remove the Address field from your audience (**Audience > Settings > Audience fields and \*|MERGE|\* tags**) or use an audience without an Address field. With Debug logging enabled, the exact Mailchimp error (including the offending field) is appended to the form message.

= I upgraded from 1.0.0 and my Mailchimp key stopped working. =
The encryption scheme changed. Re-enter your Mailchimp API key on the settings page. Existing forms using the old "Bricks to Mailchimp" action continue to work.

== Changelog ==
= 2.0.0 =
* Rewritten on a provider-based architecture (namespaced classes + autoloader).
* Added EmailOctopus (API v2) provider.
* Mailchimp: tags support, configurable update-existing behaviour, accurate error reporting.
* Stronger credential encryption (dedicated key + per-value IV) with graceful decrypt-failure handling.
* Per-provider settings sections, generated from the provider registry.
* Optional debug logging.
* Fixed undefined-variable warning and unused error detail in the Mailchimp error path.
* Fixed EmailOctopus tags being rejected (HTTP 422): v2 expects tags as a `{ name: true }` object, not a flat array.
* Fixed API keys being double-encrypted when an already-encrypted value was re-submitted; the sanitizer now leaves an already-encrypted value untouched.
* Backwards compatible with forms saved under the 1.0.0 "Bricks to Mailchimp" action.

= 1.0.0 =
* Initial release (Mailchimp only).

== Screenshots ==
1. Settings page – per-provider API keys and options.
2. Bricks form action – selecting a provider and mapping fields.

About

Plugin integrating bricksbuilder forms with various services

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages