Home › Forums › Quform WordPress › MailChimp Integration is not Working
- This topic has 1 reply, 2 voices, and was last updated 11 years, 2 months ago by Ally.
- AuthorPosts
- November 13, 2013 at 12:15 pm #7367krishnaParticipant
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 11 years, 2 months ago by Ally. Reason: Removed API key
November 13, 2013 at 1:02 pm #7369AllySupport 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.