You are here

function mailchimp_lists_update_7000 in Mailchimp 7.4

Same name and namespace in other branches
  1. 7.5 modules/mailchimp_lists/mailchimp_lists.install \mailchimp_lists_update_7000()
  2. 7.3 modules/mailchimp_lists/mailchimp_lists.install \mailchimp_lists_update_7000()

Add default Confirmation Email setting to existing Subscription fields.

File

modules/mailchimp_lists/mailchimp_lists.install, line 20
Install, update and uninstall functions for the mailchimp_lists module.

Code

function mailchimp_lists_update_7000(&$sandbox) {
  $fields = field_info_fields();
  foreach ($fields as $field) {
    if ($field['type'] == 'mailchimp_lists_subscription') {
      $field['settings']['send_welcome'] = TRUE;
      field_update_field($field);
    }
  }
}