strangerstudios / pmpro-mailchimp

WordPress plugin for MailChimp integration.
https://www.paidmembershipspro.com/add-ons/pmpro-mailchimp-integration/
GNU General Public License v3.0
25 stars 23 forks source link

Mailchimp Add On used on more than 1 PMPro site - Merge fields get overwritten #124

Open kimcoleman opened 3 years ago

kimcoleman commented 3 years ago

If you are using the Mailchimp Integration on more than one PMPro-powered membership site, the PMPLEVEL and PMPLEVELID fields will get overwritten for the audience member, regardless of the "list" they are on. It seems that merge fields are stored in Mailchimp at the "audience member" level, not per list.

We need to support a method to allow a new set of merge fields / merge field named with prefixes when we detect they already exist and this user's fields are updated from multiple sites.

For example, in the PMPro site, we have PMPLEVELID '20' for Plus members. When we connected the Sitewide Sales / Stranger Studios site to our Mailchimp account, that PMPLEVELID is overwritten for people that also signed up for Sitewide Sales.

JarrydLong commented 1 year ago

I've put together a code recipe to help achieve this in the meantime by adding a prefix to each of the merge tags.

This recipe should then be added to each site that is connected to the same MC account.

https://gist.github.com/JarrydLong/6f8e2c2a61f56eb0e5472fcfc347fa90