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?
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?
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.
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.