Mailchimp Integration

Home Forums Quform WordPress Mailchimp Integration

This topic is: not resolved

This topic contains 3 replies, has 3 voices, and was last updated by  Ally 2 weeks, 2 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #22685

    jvidales
    Participant

    Hello,

    I’m trying to integrate mailchimp with quform using your guide but it is not working.

    I enabled debug mode and get the following error:

    [13-Oct-2017 17:31:10 UTC] PHP Notice: Undefined variable: api in */public_html/wp-content/themes/Avada/functions.php on line 806
    [13-Oct-2017 17:31:10 UTC] PHP Notice: Trying to get property of non-object in */public_html/wp-content/themes/Avada/functions.php on line 806

    function my_save_to_mailchimp($form)
    {
    if (!class_exists(‘MCAPI’)) {
    require_once dirname(__FILE__) . ‘/MCAPI.class.php’;
    }

    $api = new MCAPI(‘***’);
    $listId = ‘***’;
    $email = $form->getValue(‘iphorm_2_3’);

    // OPTIONAL: if you are saving additional fields to MC, set the merge tags, otherwise set $mergeVars to an empty array
    $mergeVars = array();

    // Other settings
    $emailType = ‘html’;
    $doubleOptin = false;
    $updateExisting = false;
    $replaceInterests = false;
    $sendWelcome = false;

    $api->listSubscribe($listId, $email, $mergeVars, $emailType, $doubleOptin, $updateExisting, $replaceInterests, $sendWelcome);
    }
    if ($api->errorCode) {
    iphorm_error_log($api->errorCode, $api->errorMessage);
    }

    add_action(‘iphorm_post_process_2’, ‘my_save_to_mailchimp’, 10, 1);

    /* Omit closing PHP tag to avoid “Headers already sent” issues. */

    That is the code i’m using, I dont see anything wrong to it.

    Thanks in advance!

    #22719

    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.

    #22834

    hapoem
    Participant

    I want version 2.x Mail-to-Python integration guide

    #22892

    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 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.