Upgrading to 3.0

After months of careful planning and hard work, we are proud to present version 3.0 of MailChimp for WordPress.

It comes with a lot of improvements to the way you create your sign-up forms, more fine-grained controls for integrating with other forms and improved consistency and extensibility throughout the entire codebase.

However, in order for us to move forward, we had to change a few things. You may be required to manually take action to ensure things will still be working after the update.

Don't worry - the plugin won't update itself until you tell it to.

What changes for you

The majority of changes will be handled by the plugin itself, there's just a few advanced things that we could not automatically fix for you.

Here's what changed and what you should do to ensure things keep working as expected after the update to version 3.

Warning: the rest of this post is quite geeky. If you have no clue what it's about then you probably don't have to worry about any of it - you're safe to update!

Pro is now a new plugin: Premium

There used to be two separate plugins, MailChimp for WordPress Lite and MailChimp for WordPress Pro. This has now changed into the following two plugins.

If you're currently running Pro and not yet running version 3.0 of the free plugin, our in-plugin upgrade guide will ask you to install or update it.

Upgrade to 3.0 - MailChimp for WordPress Lite ‹ Local WordPress — WordPress 2015-11-24 10-22-39

In case you need to, you can always download the Premium plugin manually from your account page.

Captcha

If you're showing a Captcha field in your forms, please install our new Captcha add-on.

Download Captcha plugin

Form variables

If you're using form variables in your forms, like {data_NAME}, please update the syntax to the following.

<!-- Grabs the "NAME" parameter from the URL -->
{data key="NAME"}

<!-- With default value -->
{data key="NAME" default="Default value"}

JavaScript events

If you're tracking form events (with Google Analytics, for example), please take note of the new way to bind events.

// NEW
mc4wp.forms.on('subscribed', function( form ) {
 // ..
});

// OLD
jQuery(document).on('subscribe.mc4wp','.mc4wp-form', function() {
  // ..
});

The following events are available.

started       // when visitor starts filling in a form
submitted     // when form is submitted 
success       // after form is submitted without any errors
error         // after form is submitted, but with errors
subscribed    // after form is used to subscribe
unsubscribed  // after form is used to unsubscribe

Filter & action hooks

We've gone through all available filter & action hooks and fixed all naming & parameter inconsistencies.

Nearly all filters all still there, there's just two that have been removed.

mc4wp_subscribed
mc4wp_form_message_html

If you're a developer, please search your code base for filters prefixed with mc4wp_ and make sure things are still working as expected.

Our new code reference can help you here. 🙂

Was this article helpful? ·