Home › Forums › Quform WordPress › Mailchimp Integration
- This topic has 3 replies, 3 voices, and was last updated 6 years, 6 months ago by Ally.
- AuthorPosts
- October 13, 2017 at 6:41 pm #22685jvidalesParticipant
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 806function 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!
October 18, 2017 at 9:57 am #22719AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
October 28, 2017 at 1:59 pm #22834hapoemParticipantI want version 2.x Mail-to-Python integration guide
November 1, 2017 at 11:43 am #22892AllySupport 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.