For users running Paid Memberships Pro: Allows admin to set which audience each level should be subscribed to. Note that this plugin works without PMPro as well. The integration requires a Mailchimp account, so if you do not have an account you can sign up here.

We independently review everything we recommend. When you buy through our links, we may earn a commission. Learn more

Installation

You must have the Paid Memberships Pro plugin installed and activated to use this Add On.

  1. Navigate to Memberships > Add Ons in the WordPress admin.
  2. Locate the Add On and click “Install Now”.
    • Or, to install this plugin manually, download the .zip file above.
    • Upload the compressed directory (.zip) via the Plugins > Add New > Upload Plugin screen in the WordPress admin.
  3.  Activate the plugin through the Plugins screen in the WordPress admin.

Video Demo

Settings

Navigate to Settings > PMPro Mailchimp in the WordPress admin to configure the plugin for your site. Below is a description of the various settings available in the plugin.

  • Mailchimp API Key: Used to connect your website to Mailchimp. Follow the instructions in the Locating your Mailchimp API Key section below for help finding this information.
  • Non-member Audiences: These are the audiences that users will be added to if they do not have a membership level. They will also be removed from these audiences when they gain a membership level (assuming the audiences are not also set in the “Membership Levels and Audiences” option for their new level)
  • Opt-in Audiences: These are the audiences that users will have the option to subscribe to during the PMPro checkout process. Users are later able to update their choice from their profile. Audiences set as Opt-in Audiences should not also be set as a Non-member Audience nor a Level Audience.
  • Require Double Opt-in?: If set to “Yes (All audiences)”, users will be set to “Pending” status in Mailchimp when they are added to an audience instead of being subscribed right away. They will then receive an email from Mailchimp to opt-in to the audience.
  • Unsubscribe on Level Change?: If set to “No”, users will not be automatically unsubscribed from any audiences when they lose a membership level. If set to “Yes (Only old level audiences.)”, users will be unsubscribed from any level audiences they are subscribed to when they lose that level, assuming that audience is not a Non-Member audience as well. If set to “Yes (Old level and opt-in audiences.)”, users will also be unsubscribed from opt-in audiences when they lose their membership level (though they can re-subscribe by updating the setting on their profile).
  • Update on Profile Save If set to “Yes”, PMPro will update Mailchimp audiences whenever a user’s profile page is saved. If set to “No”, PMPro will only update Mailchimp when a user’s membership level is changed, email is changed, or chosen opt-in audiences are changed.
  • Membership Levels and Audiences: These are the audiences that users will automatically be subscribed to when they receive a membership level.
  • Log API Calls If set to “Yes”, a log of API calls will be created in the pmpro-mailchimp/logs folder.

Notes About Logging API Calls

If you are experiencing issues with members not being properly added to Mailchimp or otherwise unsure if your integration is properly configured, you can temporarily enable the setting to Log API Calls from the Settings > PMPro Mailchimp screen in the WordPress admin.

When you enable this setting, the plugin will store a file on your server with information about the data that this integration is sending to Mailchimp.

This file contains partial email addresses of your subscribers, their name (if collected), membership level, and other custom information you may be collecting via custom filters.

To prevent bad actors from discovering this file, the file is given a random name. But, even with the protection of an obfuscated file URL and scrubbed email data, we strongly recommend that you only leave the Log API Calls setting enabled while you are actively resolving issues with the integration.

When you are done resolving issues and confident that your site is working properly, disable debug the Log API Call setting and delete the log file (via S/FTP) that was created.

Locating Your Mailchimp API Key

  1. Log in to your account at Mailchimp.
  2. Click your profile name in the bottom left corner to expand the Account Panel, and choose Account.
  3. Click the Extras dropdown menu and choose API keys.
  4. Copy an existing API key or click the Create A Key button.
  5. Name your key so you will know what application uses that key.
  6. Copy and paste your Mailchimp API key into the “Mailchimp API Key” field under Settings > PMPro Mailchimp.

Action and Filter Hooks

Below are the most commonly used action and filter hooks.

apply_filters( 'pmpro_mailchimp_merge_fields', array $merge_fields, string $audience_id );

Creates merge fields inside Mailchimp. Should be done for any fields that are added with pmpro_mailchimp_listsubscribe_fields so that the fields are automatically created.

apply_filters( 'pmpro_mailchimp_listsubscribe_fields', array $merge_fields, WP_User $user, string $audience );

Send additional merge fields to Mailchimp. This article demonstrates how to use the ‘pmpro_mailchimp_listsubscribe_fields’ filter to send additional profile fields to Mailchimp.

apply_filters(  'pmpromc_user_data' , $mc_user_data, $user  );
apply_filters( 'pmpromc_disable_automatic_additional_audiences_updates', bool $disabled );

Stops Mailchimp from updating subscription status for opt-in lists automatically. Disabling may help site performance.

apply_filters( 'pmpromc_profile_update', bool $update, int $user_id, WP_User $old_user );

Overwrites the “Update on Level Save” setting. Should be phased out eventually in favor of the setting, but we’ve included it here since it is used in a lot of the code recipes we previously shared.

pmpromc_update_audience_members_data

Allows modifying data sent to the `/lists/{$audience}` Mailchimp endpoint

CSV Export Filters

The two filters linked below are part of core Paid Memberships Pro and are used within the MailChimp Add On for export-related adjustments.

apply_filters( 'pmpro_set_max_user_per_export_loop', int $max_users );

Sets max number of users exported at a time during CSV export. For information on this filter, see: https://www.paidmembershipspro.com/hook/pmpro_set_max_user_per_export_loop/

apply_filters( 'pmpro_memberslist_csv_dateformat', string $format );

Sets date format used during CSV export. For information on this filter, see: https://www.paidmembershipspro.com/hook/pmpro_memberslist_csv_dateformat/

Rarely Used Action and Filter Hooks

The action and filter hooks below are included in the Mailchimp Add On for Paid Memberships Pro but primarily only used for internal functions. It is unlikely that you will need to leverage this hooks.

apply_filters( 'pmpro_addon_mc_api_timeout', int $timeout );
apply_filters( 'pmpro_addon_api_timeout', int $timeout );
apply_filters( 'pmpro_addon_mc_api_fetch_list_limit', int $limit );
apply_filters( 'get_mailchimpapi_class_instance', PMPromc_Mailchimp_API $api );
do_action( 'pmpromc_get_api_failed', PMPromc_Mailchimp_API $api );

Screenshots

Screenshot of General Settings for the Mailchimp Add On for Paid Memberships Pro

Screenshot of General Settings for the Mailchimp Add On for Paid Memberships Pro

Screenshot of Membership Levels and Audience Settings for the Mailchimp Add On for Paid Memberships Pro

Screenshot of Membership Levels and Audience Settings for the Mailchimp Add On for Paid Memberships Pro

This is a Free Add On.

Create a free account or log in to gain access to downloads and documentation.