The MailChimp Integration extension is a premium add-on for WP-Members that adds an additional settings tab for linking to a MailChimp list through the MailChimp API version 3.0.
It allows you to specify a subscription field, control if a double opt-in message is sent, and if WP-Members is set to approve registrations, it can hold MailChimp subscriptions until the user is approved.
This extension is available to support subscribers. For a limited time, support subscriptions include all available add-ons and extensions for the plugin as well as priority support, members only forum, and the code snippet library.
Download the Extension: You must be logged in to download
This extension installs as a plugin. You can download the installation package as a zip file. Then use the new plugin uploader or unzip the package and FTP transfer to your plugin’s folder.
Once the extension is installed, you can go to Plugins > Installed Plugins to activate.
You will also need an API Key from MailChimp as well as a List ID in order to connect the extension to a valid MailChimp list.
If you are upgrading from any 1.x version, please read this post about upgrading for some important notes.
Using the Extension
The extension will add a MailChimp tab to the WP-Members admin panel.
You will need your MailChimp API key and list ID. You’ll also need to indicate which checkbox field is being used to subscribe a user. A dropdown list will list all checkbox fields in your registration form (except for the TOS field). From this list, choose the checkbox that is intended for MailChimp subscription opt-in. If no checkbox fields exist, it will tell you to create one. This can be done in the fields tab.
MailChimp API Key: The API key you created in MailChimp. You can establish different API keys in your account and utilize them for different purposes. For more information setting up a MailChimp API key, see this topic in the MailChimp knowledgebase.
List ID: Each MailChimp has a unique List ID. This is the number that you need to tell MailChimp which list is being managed through the API. The WP-Members MailChimp Extension currently only allows you to manage one list. More more information on retrieving your List ID from MailChimp, see this topic in the MailChimp knowledgebase.
Subscribe Field: This setting allows you to define which checkbox field from your registration form is the subscribe field. (You must select a field for the user to opt-in to the list. Users are not automatically added.) If you do not have any checkbox fields set up in your registration form, this selector will indicate that you need to create one. IMPORTANT: If you later change the checked value of this field in the plugin’s fields tab, you will need to re-save the MailChimp settings to also update this value.
Double Opt-in: MailChimp by default will send your user an email confirming their subscription. If you do not want to send this message, uncheck this option. Please note that if you are flagged for abuse by MailChimp, one thing they look at will be whether or not you send the double opt-in confirmation. If you don’t and you have a lot of spam complaints, that’s probably going to lead to them shutting off your account.
When a WP user is deleted: This setting allows you to determine what happens to a MailChimp subscriber when their user account is deleted in WordPress. The default setting is to do nothing, which leaves them on your list in their current state (pending, subscribed, or unsubscribed). You can set this to either delete or unsubscribe a user on your MailChimp list when they are deleted from WordPress.
Registration is moderated: This setting only shows if moderated registration is enabled in the plugin’s main options tab. This checkbox allows you to hold new MailChimp subscriptions until the user is approved in WordPress.
When a user is deactivated: Like the above setting, this only shows if moderated registration is enabled. This setting operates the same as “When a WP user is deleted” above, but on deactivation of a user.
MailChimp Merge Fields
MailChimp merge fields can be mapped to any of the WP-Members registration fields in the mail merge fields settings area. This area will indicate all mail merge fields in your MailChimp list, whether they are required fields or not, and what WP-Members field they are mapped to.
Merge fields that are not required do not have to be mapped for subscription to work. However, only merge fields that are mapped to registration fields will have data passed to them when a user subscribes.
If a field is required in MailChimp, that data MUST be passed during subscription or the user will not be added. This means the field must have data associated with it. This means it should be mapped and that field should be required. (The exception to this would be if a specific piece of data is to be set for a specific merge field and that data is generated by a function hooked to the wpmem_mc_merge filter hook, but that’s a more advanced topic for special situations.)
There is a wpmem_mc_merge filter hook in the module for you to use and this can be used to programmatically set values to be tied to specific merge fields.
The MailChimp Integration Extension has the following API function:
Check out this tutorial on how to use this function to add subscriber stats to the admin user profile screen.