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.

About: Mack Gaither

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing 2 topics - 1 through 2 (of 2 total)
Topic Count Last Reply
Custom profile and Mailchimp

By:  Mack Gaither in: Community Forum

voices: 2
replies: 8

3 years, 4 months ago  Cristián Lávaque

Membership best practice ideas

By:  William Hagan in: Community Forum

voices: 3
replies: 2

3 years, 10 months ago  Mack Gaither

Viewing 2 topics - 1 through 2 (of 2 total)

Topics I've Started

Viewing topic 1 (of 1 total)
Topic Count Last Reply
Custom profile and Mailchimp

By:  Mack Gaither in: Community Forum

voices: 2
replies: 8

3 years, 4 months ago  Cristián Lávaque

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Thursday Aug 29th, 2013 at 10:35 pm #58868

That did it. Thanks very much.

Posted: Wednesday Aug 28th, 2013 at 9:26 am #58801

BTW, I thought I had posted this on the Customer Forum. I have paid for Pro.

That solved the problem for some of the fields. Before you replied to my first posting, I tried to match the field names in S2member with Mailchimp and ran into a problem. It appears that the Mailchimp field names are limited to 10 characters. In S2member I have default fields such as Last Payment Date and custom fields such as “spouse_name” that are longer than 10. Not knowing how to change the default length in mailchimp, or if it would recognize just the first 10 characters and be okay, I changed the field names in S2members. Unfortunately, doing that caused the data that had been entered by users to disappear. None of this mattered at that time because I didn’t know that I had to customize the program as you explained.

I tried changing the fields today in Mailchimp and it now works for those S2member fields that are 10 characters or less, but not for those longer field names. Is there a way to change the filed names in S2member without losing the data that has been entered? Thanks again for your help.

Posted: Thursday Aug 22nd, 2013 at 9:39 am #56442

Thank you for the clarification, however I followed your instructions and the data did not get into Mailchimp. I created the mu-plugins folder and uploaded the s2-hacks.php file which contained the following:

<?php
add_filter('ws_plugin__s2member_mailchimp_merge_array', 'my_filter', 10, 2);
function my_filter($merge, $vars) {
	// $merge: Array of existing MERGE fields that s2Member passes by default.
	// $vars:  Array of defined variables in the scope/context of this Filter.

	$custom_merge = array(
		'ID'   => get_user_field('ID', $vars['user_id']),
		'Role'   => get_user_field('Role', $vars['user_id']),
		'Registration Date'   => get_user_field('Registration Date', $vars['user_id']),
		'Auto-EOT Date'   => get_user_field('Auto-EOT Date', $vars['user_id']),
		'Nick_Name' => get_user_field('Nick_Name', $vars['user_id']),
		'birth_date'   => get_user_field('birth_date', $vars['user_id']),
		'Street_Address' => get_user_field('Street_Address', $vars['user_id']),
		'Address_2nd'   => get_user_field('Address_2nd', $vars['user_id']),
		'City' => get_user_field('City', $vars['user_id']),
		'State'   => get_user_field('State', $vars['user_id']),
		'Zip' => get_user_field('Zip', $vars['user_id']),
		'Home_Phone'   => get_user_field('Home_Phone', $vars['user_id']),
		'Other_Phone' => get_user_field('Other_Phone', $vars['user_id']),
		'Spouse_Name'   => get_user_field('Spouse_Name', $vars['user_id']),
		'spouse_birth' => get_user_field('spouse_birth', $vars['user_id']),
		'Directory'   => get_user_field('Directory', $vars['user_id']),
	);

	return array_merge($merge, $custom_merge);
}

And I received the following email from Mailchimp after their confirmation email.

Yippee! You've got a new subscriber for your list Society of John Gaither 
Descendants.

Note: This is for your account named The Society of John Gaither Descendants

Email Address: mack.gaither@gmail.com
First Name: Angus
Last Name: Gaither
ID: 73
Username: 
Password: 
Display Name: 
Role: 0
Registration Date: 
First Payment Date: 
Last Payment Date: 
Auto-EOT Date: 
Paid Subscr. ID: 
Full Address: 
address_2nd: 
birth_date: 
city: 
directory: 
home_phone: 
nick_name: 
other_phone: 
spouse_birth: 
spouse_name: 
state: 
street_address: 
zip: 
I am a: 


Date: Aug 22, 2013 08:50 am
Signup IP: 96.247.193.33

Feels good to be loved. 

Cheers, 

The MailChimp Crew

And here is the Mailchimp log file from S2Member:

LOG ENTRY: Thu Aug 22nd, 2013 @ precisely 12:42 pm UTC
PHP v5.2.17 :: WordPress® v3.6 :: s2Member® v130816 :: s2Member® Pro v130816
Memory 28.60 MB :: Real Memory 28.75 MB :: Peak Memory 28.64 MB :: Real Peak Memory 28.75 MB
gaither.info/wp-login.php?action=register
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36
array (
  'function' => 'process_list_servers',
  'func_get_args' => 
  array (
    0 => 'subscriber',
    1 => '0',
    2 => 'mackgaither',
    3 => '5sWHZUnhn6H1',
    4 => 'mack.gaither@gmail.com',
    5 => 'Angus',
    6 => 'Gaither',
    7 => '96.247.193.33',
    8 => true,
    9 => true,
    10 => 73,
  ),
  'api_method' => 'listSubscribe',
  'list' => '7cc439dcce',
  'list_id' => '7cc439dcce',
  'merge_array' => 
  array (
    'MERGE1' => 'Angus',
    'MERGE2' => 'Gaither',
    'OPTIN_IP' => '96.247.193.33',
    'OPTIN_TIME' => '2013-08-22 12:42:53',
  ),
  'api_merge_array' => 
  array (
    'MERGE1' => 'Angus',
    'MERGE2' => 'Gaither',
    'OPTIN_IP' => '96.247.193.33',
    'OPTIN_TIME' => '2013-08-22 12:42:53',
    'ID' => 73,
    'Role' => false,
    'Registration Date' => false,
    'Auto-EOT Date' => false,
    'Nick_Name' => 'Mack',
    'birth_date' => '01/01/2011',
    'Street_Address' => '123 Main',
    'Address_2nd' => '',
    'City' => 'Benton',
    'State' => 'ID',
    'Zip' => '20202',
    'Home_Phone' => '202-202-2020',
    'Other_Phone' => '',
    'Spouse_Name' => 'Honey',
    'spouse_birth' => '01/01/1901',
    'Directory' => false,
  ),
  'api_email_type' => 'html',
  'api_double_optin' => true,
  'api_update_existing' => false,
  'api_replace_interests' => true,
  'api_send_welcome' => false,
  'api_response' => true,
  'api_success' => true,
  'api_properties' => 
  NC_MCAPI::__set_state(array(
     'version' => '1.3',
     'errorMessage' => '',
     'errorCode' => '',
     'apiUrl' => 
    array (
      'scheme' => 'http',
      'host' => 'api.mailchimp.com',
      'path' => '/1.3/',
      'query' => 'output=php',
      'prefix' => 'us5',
    ),
     'timeout' => 300,
     'chunkSize' => 8192,
     'api_key' => 'xxxxxxxx/api/key/sec',
     'secure' => true,
  )),
)

Hope this helps find the problem. Thanks again.

Posted: Monday Mar 11th, 2013 at 9:22 am #44250

I haven’t started using S2 yet, but have a similar situation and am getting ready to install. We will have 3 levels of membership: No cost, Registered User; then Individual Membership at $20; and Family Membership at $25. Can the forms for recording information on members be modified to cover fields such as spouse, date of birth, etc. so that the Individual only has forms for one person and the family has fields for more than one? I’d like to know a little more about it before I embark on installing S2. Thank you.

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

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.