🇫🇷France thomas-at-passerelle
thomas-at-passerelle → created an issue.
🇫🇷France thomas-at-passerelle
The second issue was just like creating a node
$campaign_id = mailchimp_campaign_save_campaign($template_content, $recipients, $settings, NULL);
if (empty($campaign_id)) {
$this->messenger()->addMessage(t('An error occurred while saving this campaign to MailChimp service.'), 'error');
}
else {
// Create campaign entity and save
$campaign = \Drupal::entityTypeManager()->getStorage('mailchimp_campaign')->create();
$campaign->setMcCampaignId($campaign_id);
$campaign->setTemplate($template_content);
$campaign->save();
}
🇫🇷France thomas-at-passerelle