latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

s2Member & MailChimp loses new member registr

Home Forums Community Forum s2Member & MailChimp loses new member registr

This topic contains 3 replies, has 3 voices. Last updated by  Bruce 4 years, 1 month ago.

Topic Author Topic
Posted: Wednesday Nov 28th, 2012 at 5:31 pm #32830
akpey1000
Username: akpey1000

When a new person registers at my site, the s2member’s database is updated. But the new person’s information is not sent to a MailChimp list.

At (s2Member >>> API/ListServers >>> MailChimp-Integration) I checked and re-checked my Mailchimp API key and the ID number of the Mailchimp list.

Inside the wp-content directory, I made a new directory mu-plugins and created the s2-hacks.php file. The contents of this file are:

<?php
add_filter("ws_plugin__s2member_mailchimp_double_optin", "__return_false");
?>

There is still no update to the Mailchimp list when a new person registers.

Can you help? Thanks.

Ananda

  • This topic was modified 4 years, 1 month ago by  akpey1000.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Nov 29th, 2012 at 7:08 am #32889

Hi Ananda.

Are your list IDs entered correctly in the s2Member integration with MailChimp? [hilite path]Dashboard -› s2Member® -› API / List Servers -› MailChimp®[/hilite]

And if you test with the double opt-in, do you get the confirmation email from MailChimp? When the user doesn’t show up in the list, I’ve seen it’s been because the user hasn’t confirmed the subscription yet. If you add the hack to disable the double opt-in, though, it’s hard to tell if the hack’s not working and the user just didn’t confirm, or if the hack is working and the problem is something else. Could you remove the hack and try a test registration with a different email address, so you get sent the confirmation email and can test this?

Posted: Sunday Dec 2nd, 2012 at 6:03 am #33202
akpey1000
Username: akpey1000

Hello Christian,

Thanks for the advice. I took out the hack and turned on s2member’s logging (Dashboard -› s2Member® -› PayPal® Options -› Account Details -› Logging).

I saw the following message:
‘errorMessage’ => ‘UNAME must be provided – Please enter a value’,

UNAME (for user-name) is one of the fields I setup on the MailChimp side to be required. After I unchecked the Required Box for this field and a few other fields, there was no error. I confirmed that the information from s2member made it across the waters to the MailChimp list.

However some data drowned along the way. The only fields that made it were 1. email address, 2. first name, and 3. last name.

There are 6 custom fields on the s2member side that I’d like transferred to the MailChimp side. I created these fields in (Dashboard -› s2Member® -›General Options -› Registration/Profile Fields).

Is there a way to transfer these custom fields?

Posted: Sunday Dec 2nd, 2012 at 4:07 pm #33228
Bruce
Username: Bruce
Staff Member

Hi Ananda,

Currently s2Member only supports the fields that you currently have with your MailChimp setup. There are plans to add more features to the MailChimp section of s2Member, but as of yet that is all you are able to do without some custom code.

To “hack” into s2Member and get these custom fields, you can do something similar to this:

add_filter('ws_plugin__s2member_mailchimp_merge_array', 's2hack_filter_mailchimp_query');
function s2hack_filter_mailchimp_query($merge, $vars)
	{
		$user_id = $vars['user_id'];
		$user = new WP_User($user_id);
		
		$uname = $user->user_login;
		
		$custom1 = get_user_field ('custom1', $user_id);

		$custom_fields= array('UNAME' => $uname, 'CUSTOM1' => $custom1);
		return array_merge($merge, $custom_fields);
	}

The above code would send the custom field custom1 to MailChimp as CUSTOM1, as well as sending the user’s login as UNAME.

This code should go into a Must-Use Plugin, within /wp-content/mu-plugins/ (create the directory and file if you do not already have it).

If you need any assistance with setting up the code that you need, let me know. :)

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.