Mailchimp Integration no longer working

Home Forums Quform WordPress Mailchimp Integration no longer working

This topic is: not resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15176
    richardnorthwood
    Participant

    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.
    #15177
    richardnorthwood
    Participant

    moderator: could you please remove my list ID and API? Thank you

    #15230
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy