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.