We're finding that this extension tries to subscribe a contact to all CviCRM/Mailchimp groups each time any contact is edited, if the contact is a member of zero CiviCRM groups.
Here's what's happening:
mailchimp_civicrm_post() fires for any contact edit event. It queries for all groups for the contact using CRM_Contact_BAO_GroupContact::getGroupList($objectId), which will return an empty array if the contact has no groups.
mailchimp_civicrm_post() then queries all Mailchimp lists for the contact's groups, using CRM_Mailchimp_Utils::getGroupsToSync(), which takes as its argument an array of CiviCRM groups; if that array is empty, it returns all Mailchimp lists.
mailchimp_civicrm_post() then asks Mailchimp to subscribe the contact to each of those lists, using CRM_Mailchimp_Utils::subscribeOrUnsubsribeToMailchimpList().
I think the simple fix is to quit the process as soon as it's known that the contact has no groups.
If you like, I can issue a PR which will hopefully be more self-explanatory.
We're finding that this extension tries to subscribe a contact to all CviCRM/Mailchimp groups each time any contact is edited, if the contact is a member of zero CiviCRM groups.
Here's what's happening:
I think the simple fix is to quit the process as soon as it's known that the contact has no groups.
If you like, I can issue a PR which will hopefully be more self-explanatory.