function mailchimp_update_member in Mailchimp 8
Same name and namespace in other branches
- 7.5 mailchimp.module \mailchimp_update_member()
- 7.3 mailchimp.module \mailchimp_update_member()
- 7.4 mailchimp.module \mailchimp_update_member()
- 2.x mailchimp.module \mailchimp_update_member()
Update a members list subscription in real time or by adding to the queue.
See also
Mailchimp_Lists::updateMember()
2 calls to mailchimp_update_member()
- MailchimpListsSubscriptionTest::testUpdateMember in modules/
mailchimp_lists/ src/ Tests/ MailchimpListsSubscriptionTest.php - Tests updating a list member.
- mailchimp_lists_process_subscribe_form_choices in modules/
mailchimp_lists/ mailchimp_lists.module - Processor for various list form submissions.
File
- ./
mailchimp.module, line 620 - Mailchimp module.
Code
function mailchimp_update_member($list_id, $email, $merge_vars, $interests = [], $format = 'html', $double_optin = FALSE, $gdpr_consent = FALSE) {
$config = \Drupal::config('mailchimp.settings');
if ($config
->get('cron')) {
$args = [
'list_id' => $list_id,
'email' => $email,
'merge_vars' => $merge_vars,
'interests' => $interests,
'format' => $format,
'double_optin' => $double_optin,
'gdpr_consent' => $gdpr_consent,
];
return mailchimp_addto_queue('mailchimp_update_member_process', $args);
}
return mailchimp_update_member_process($list_id, $email, $merge_vars, $interests, $format, $double_optin, $gdpr_consent);
}