October 14, 2010 at 3:06 pm #2025intern007Member
how do I go about passing a few extra fields from the registration form to MailChimp (e.g. the state and province fields). I would like when new users signup to be automatically signed up with MailChimp but I need to get their address information as well over to MailChimp?
RegardsOctober 15, 2010 at 2:37 am #25458
You will need to modify the “eMember_auto_responder_handler.php” file which handles the signup:
Search for the following function which does the actual signup:
Follow the trail of where the function gets called from so you can pass in the other data to this function.October 15, 2010 at 7:58 am #25459intern007Member
ThanksFebruary 1, 2011 at 6:58 pm #25460hoffybalboaMember
This is good, but is it possible to get more detailed information about this? I would like to at the very least pass the WordPress Username and Phone to mailchimp. Could you help mark up the actual code below, to show us non-coders, how to pass username and phone?
Here is the code from eMember_mailchimp_subscribe:
$lists = $api->lists();
foreach ($lists AS $list)
if ($list == $target_list_name)
$list_id = $list;
$merge_vars = array(‘FNAME’=>$fname, ‘LNAME’=>$lname,
$retval = $api->listSubscribe( $list_id, $email_to_subscribe, $merge_vars );
Thank youFebruary 2, 2011 at 4:06 am #25461
Its not that simple as the phone number and the WordPress username is not passed to this function. So the first thing you will need to do is pass the WordPress username and the phone number to this function then I will be able to give you help with the markup.February 2, 2011 at 4:30 am #25462hoffybalboaMember
Pardon my ignorance, but I do not understand or how to proceed.March 11, 2011 at 3:46 pm #25463dkbrainardMember
When I installed WP eMember plugin, I had about 700 people subscribed to my legacy list.
In configuring MailChimp, we set up three membership levels
None – legacy subscribers
Free – eMember free subscribers
Premium – eMember paid subscribers
When my legacy members sign up for my member site in eMember, this change isn’t reflected in MailChimp data. (I.e. eMember shows them as Free or Premium members but MailChimp still shows member level as None).
How can I send the changed member level to Mail Chimp for pre-existing subscribers?
Thanks – I have both eStore and eMember and the plug-ins are fantastic.
DK BrainardMarch 12, 2011 at 12:17 am #25464
The plugin only signs up a user to a particular list. It doesn’t not send any membership level data to MailChimp.March 12, 2011 at 1:47 am #25465dkbrainardMember
Thanks Amin. The integration between eMember and Mail Chimp does seem to be working to the effect that when one of my legacy users becomes a Free Member on my site, it doesn’t add a duplicate list entry on Mail Chimp. So that’s cool. Wish there was a way to send the membership level over, though.September 1, 2011 at 3:25 pm #25466
Hello, has anyone figured out how to pass more e-member field data to mailchimp? I have been looking at the emember code and the MCAPI code for hours and i don’t have enough smarts to figure this out. In the MCAPI it says that other field data can be passed through
array $merge_vars array of merges for the email (FNAME, LNAME, etc.)
I edited the file eMember_auto_responder_handler.php like this:
$lists = $api->lists();
foreach ($lists AS $list)
if ($list['name'] == $target_list_name)
$list_id = $list['id'];
$merge_vars = array('FNAME'=>$fname, 'LNAME'=>$lname, 'COMPANY'=>$company,
if ($emember_config->getValue('eMember_use_mailchimp') == 1)
$api = eMember_get_chimp_api();
$target_list_name = $emember_config->getValue('eMember_chimp_list_name');
$retval = eMember_mailchimp_subscribe($api,$target_list_name,$firstname,$lastname,$company_name,$emailaddress);
eMember_log_debug('Mailchimp email address to signup:'.$emailaddress,true);
eMember_log_debug('Mailchimp list to signup to:'.$target_list_name,true);
eMember_log_debug('Mailchimp signup operation performed. returned value:'.$retval,true);
Once I added $company_name to the eMember_global_autoresponder_signup function it seems to have brokent hte connection with mailchimp. here is the output from my log file:
[09/01/2011 3:15 PM] - SUCCESS :Performing global autoresponder signup if specified.
[09/01/2011 3:15 PM] - SUCCESS :Mailchimp email address to signup:
[09/01/2011 3:15 PM] - SUCCESS :Mailchimp list to signup to:Web Customers
[09/01/2011 3:15 PM] - SUCCESS :Mailchimp signup operation performed. returned value:
[09/01/2011 3:15 PM] - SUCCESS :End of global autoresponder signup.
the return value should be 1
Also, I did add the mergtag ‘COMPANY’ in my mailchimp account..
Am I missing something. Please help me because I think I am close to figuring this out. Possibly the variable for company in e-member is not right. should it be $wp_emember_company_name or something else?
Your help is greatly appreciated. Thanks, DdeoSeptember 1, 2011 at 4:00 pm #25467
So I removed the variable $company_name from the eMember_global_autoresponder_signup because after looking at that again it doesn’t work with mail chimp.
So now when I register a new user it gets added to mailchimp but nothing is entered for company. I tried the variable $company too and that doesn’t work.
Can anyone tell me how to pass this variable into the mergetag? Thanks! DdeoSeptember 1, 2011 at 7:16 pm #25468
Finally figured it out. Just needed to go out and get lunch for a bit.
Needed to edit:
/*** Signup the member to Autoresponder List (Autoresponder integration) ***/ eMember_global_autoresponder_signup($_POST,$_POST,$_POST,$_POST);
/*** end of autoresponder integration ***/
- You must be logged in to reply to this topic.