Home › Forums › Quform WordPress › Mailchimp Integration no longer working
- This topic has 2 replies, 2 voices, and was last updated 8 years, 11 months ago by Ally.
- AuthorPosts
- April 30, 2015 at 9:45 pm #15176richardnorthwoodParticipant
Okay folks, a bit of a back story.
About a week ago I successfully tied one of my quforms into my mailchimp list as per the instructions. I believe after I did that there was a theme, or wordpress update, or both.
I went to add another form with a different ID number etc. I folllowed the instructions again but I noticed when I went to add the code to the functions.php file the old mailchimp code was no longer there at the bottom. That was odd.
So now when I followed the instructions, and added basically the same code, I get a PARSE error on line 2401 in functions.php and my website doesn’t load. Obviously I removed it. But I’d really like to get this mail chimp integration tied back in, its important to my work flow.
Here is the code I was trying to use, and it seems as though the error is occuring at the site of the first MERGE tag:
—-
function my_save_to_mailchimp($form)
{
if (!class_exists(‘MCAPI’)) {
require_once dirname(__FILE__) . ‘/MCAPI.class.php’;
}$api = new MCAPI(‘-SNIP-‘);
$listId = ‘-SNIP-‘;
$email = $form->getValue(‘iphorm_5_1’);// OPTIONAL: if you are saving additional fields to MC, set the merge tags, otherwise set $mergeVars to an empty array
$mergeVars = array(
‘EMAIL’ => $form->getValue(‘iphorm_5_1’),
‘FNAME’ => $form->getValue(‘iphorm_5_2’),
‘LNAME’ => $form->getValue(‘iphorm_5_3’)
);// Other settings
$emailType = ‘html’;
$doubleOptin = false;
$updateExisting = false;
$replaceInterests = false;
$sendWelcome = false;$api->listSubscribe($listId, $email, $mergeVars, $emailType, $doubleOptin, $updateExisting, $replaceInterests, $sendWelcome);
}
add_action(‘iphorm_post_process_5’, ‘my_save_to_mailchimp’, 10, 1);
—-Any help would be GREATLY appreciated.
- This topic was modified 8 years, 11 months ago by Ally.
April 30, 2015 at 9:47 pm #15177richardnorthwoodParticipantmoderator: could you please remove my list ID and API? Thank you
May 10, 2015 at 1:08 pm #15230AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.