- Issue created by @aprice42
Mailchimp module recently began supporting OAuth for authentication. API key usage has been deprecated and will be removed from the Mailchimp module in the near future. There are a few places in this module that need to be updated to take this into consideration.
Wherever there is a call to check for the api_key there needs to be new logic added to not only check for the key but also check for an active authentication. A new helper method was added to the Mailchimp PHP library that could be useful for this:
$object = \Drupal::service('mailchimp.client_factory')->getByClassNameOrNull($classname);
if ($object && $object->hasApiAccess()) {
// Properly authenticated by either api_key or access_token.
}
Active
2.0
Code