Support

Home Forums MailChimp Integration Set Default Mailchimp List for All Events?

Set Default Mailchimp List for All Events?

Posted: October 13, 2020 at 6:19 pm

Viewing 3 reply threads


ted@tedleonhardt.com

October 13, 2020 at 6:19 pm

Hi there,

We have just one Mailchimp list and I was wondering if there’s a way to set that list as the default for every Event, so we don’t need to set it every time. Is that possible? Any suggestions?


Tony

  • Support Staff

October 14, 2020 at 4:45 am

Hi there,

We don’t currently have an option to do this within the add-on, it would be possible via some custom code but would be specific to your set up as the MailChimp add-on saves the selected list and question mappings within the database.

If you are comfortable with PHP or working with a developer I can help point you to how the MailChimp add-on itself set those values if that will help?


ted@tedleonhardt.com

October 14, 2020 at 12:16 pm

Thanks, yes that would be helpful.


Tony

  • Support Staff

October 16, 2020 at 3:34 am

OK, so the hardest part of this is actually getting the MailChimp list ID and question mappings, you’ll basically need to do what the MailChimp meta box does yourself.

You can see how that is done within eea-mailchimp/includes/EE_MCI_Controller.class.php

Stating with the mci_get_users_lists you can see how we contact MailChimp to pull various details (not just lists, but interests/groups and merge_vars/questions.

Then check mci_save_metabox_contents to see how we save those details.

What you may actually be better doing is using the function we use to duplicate the settings when an event is duplicated which is espresso_mailchimp_duplicate_event.

Either create your own version of it or call it, passing an old event you know has the MailChimp settings set on it and the new/current event, do that on the save_post hook after checking its an EE post and no Mailchimp list has been set already.

Viewing 3 reply threads

The support post ‘Set Default Mailchimp List for All Events?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso