Home › Forums › Quform WordPress › Mailchimp Intergration Code Not working
- This topic has 10 replies, 2 voices, and was last updated 7 years ago by
Ally.
- AuthorPosts
- August 23, 2018 at 6:35 pm #26807
rnipper
Participant<?php /* * Plugin Name: Quform MailChimp Integration * Description: Add subscribers to MailChimp from Quform forms. * Version: 1.0 */ add_filter('quform_post_process_2', function (array $result, Quform_Form $form) { if (!class_exists('MCAPI')) { require_once dirname(__FILE__) . '/MCAPI.class.php'; } $api = new MCAPI('*SNIP*'); $listId = '*SNIP'; $email = $form->getValue('quform_2_4'); $mergeVars = array( /*'PHONE' => $form->getValue('quform_2_7')*/ ); // Set the first and last name (optional) $fullname = $form->getValue('quform_2_3'); $name = explode(" ", $fullname); $mergeVars['FNAME'] = $name[0]; $mergeVars['LNAME'] = $name[1]; // Other settings $emailType = 'html'; $doubleOptin = false; $updateExisting = false; $replaceInterests = false; $sendWelcome = true; $api->listSubscribe($listId, $email, $mergeVars, $emailType, $doubleOptin, $updateExisting, $replaceInterests, $sendWelcome); return $result; }, 10, 2);
I have used this on multiple sites and it was working before August and now it just stopped working when setting up a new list.
- This topic was modified 7 years ago by
Ally. Reason: Removed API key
August 27, 2018 at 2:15 pm #26830Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 27, 2018 at 7:17 pm #26842rnipper
ParticipantI am using QuForm V2 and already added the true statement and still didn’t work.
August 27, 2018 at 7:23 pm #26844Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 27, 2018 at 7:52 pm #26845rnipper
ParticipantEmail has been sent with the information.
August 29, 2018 at 2:54 pm #26857Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 29, 2018 at 2:57 pm #26858rnipper
ParticipantThanks that worked…what it is the difference between 10,1 and 10,2? Everything I looked up when doing this always had 10,2
August 29, 2018 at 3:03 pm #26859Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
August 29, 2018 at 3:18 pm #26860rnipper
ParticipantSo I do not know if this is a caching or what but I copy and pasted the working code from the dev site to the live site and it isn’t accepting it anymore. Does it have to do with https?
August 29, 2018 at 4:29 pm #26864rnipper
ParticipantIt is working now! It might of been that my happy little self didn’t realize it wasn’t activated on the live site. Thanks for the assistance! Greatly appreciate you taking a look at it!
August 29, 2018 at 4:38 pm #26866Ally
Support StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- This topic was modified 7 years ago by
- AuthorPosts
- You must be logged in to reply to this topic.