MailChimp Integration is not Working

Home Forums Quform WordPress MailChimp Integration is not Working

This topic is: not resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7367
    krishna
    Participant

    Hello Team,
    Our mail chimp intergration is not working and getting following error in the logs. Please help to fix these issues.

    Error Logs
    [Wed Nov 13 12:01:01 2013] [error] [client 141.134.48.177] PHP Warning: Invalid argument supplied for foreach() in /nas/wp/www/cluster-1104/mayehair/wp-content/plugins/iphorm-form-builder/includes/CSSParser/lib/CSSRule.php on line 46, referer: http://t.co/dt1N17hb35
    [Wed Nov 13 12:01:58 2013] [error] [client 180.105.253.167] PHP Warning: Invalid argument supplied for foreach() in /nas/wp/www/cluster-1104/mayehair/wp-content/plugins/iphorm-form-builder/includes/CSSParser/lib/CSSRule.php on line 46
    [Wed Nov 13 12:02:19 2013] [error] [client 180.105.253.167] PHP Fatal error: Cannot redeclare class mcapi in /nas/wp/www/cluster-1104/mayehair/wp-content/themes/blanco/MCAPI.class.php on line 3, referer: http://www.mayehair.com/

    Fuctions.php

    <?php
    global $etheme_theme_data;
    $etheme_theme_data = wp_get_theme( get_stylesheet_directory() . '/style.css' );
    define('ETHEME_DOMAIN', 'blanco');
    define('ETHEME_OPTIONS', 'site_basic_options');
    require_once( get_template_directory() . '/code/init.php' );
    /* Qform MailChimp Integration Scrip
    Date: 2013-11-09
    Krishna
    */
    add_action('iphorm_post_process_1', 'mytheme_save_to_mailchimp', 10, 1);

    function mytheme_save_to_mailchimp($form)
    {
    require_once dirname(__FILE__) . '/MCAPI.class.php';

    $api = new MCAPI('*SNIP*');
    $listId = '*SNIP*';
    $email = $form->getValue('iphorm_1_2');

    // OPTIONAL: if you are saving additional fields to MC, set the merge tags, otherwise set $mergeVars to an empty array
    $mergeVars = array(
    'FNAME' => $form->getValue('iphorm_1_1'),
    'MMERGE6' => $form->getValue('iphorm_1_4'),
    'MMERGE20' => $form->getValue('iphorm_1_3')
    );

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

    $api->listSubscribe($listId, $email, $mergeVars, $emailType, $doubleOptin, $updateExisting, $replaceInterests, $sendWelcome);
    iphorm_error_log($response);
    }

    • This topic was modified 10 years, 5 months ago by Ally. Reason: Removed API key
    #7369
    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 2 posts - 1 through 2 (of 2 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