Filters and Hooks

MailChimp for WordPress comes with a range of so called filter and action hooks. These hooks allow you to modify certain functionality in the plugin without having to edit the plugin files itself.

As mentioned, there are two types of hooks: actions and filters.

  • Filters allow you to intercept and modify data as it is processed.
  • Actions allow you to execute code at a specific points in a process.

Example filter: Add a custom LANGUAGE field to the data that is sent to MailChimp.
Example action: Set a custom cookie whenever someone signs up to your MailChimp list.

Available hooks

All available hooks are documented in our developer documentation.

Additionally, we have a GitHub repository with example code snippets which contains common modifications of our users.

Where do these hooks go?

Normally you would place your action- and filter hooks in a child theme or in a plugin of its own. For more information, please take a look at our article on adding code to your site.

Was this article helpful? ·