No luck getting the EOT (non-recurring subscriptions) passed to Mailchimp.
We’ve added the EOT as a custom merge field vai s2mhacks file and, the other custom fields show up in Mailchimp just fine - but not EOT. Here’s that s2mhacks code we have:
add_filter(‘ws_plugin__s2member_mailchimp_merge_array’, function ($custom_fields, $vars)
{
$args = &$vars[‘args’]; // stdClass object.
$user_account_eot = s2member_eot();
$eot_date = '';
if ( ! empty( $user_account_eot['tense'] ) ) {
if ( ! empty( $user_account_eot['time'] ) ) {
$eot_date = date( 'Y-m-d', $user_account_eot['time'] );
}
}
$custom_fields = array_merge($custom_fields, array(
//'ADDRESS' => 'N/A',
//'PHONE' => 'N/A',
'ROLE' => $args->role,
'REGDATE' => date( 'Y-m-d', time() ),
'EOT' => $eot_date
// A Custom Registration/Profile Field in s2Member can be obtained like this.
// Note that `my_custom_field_id` should be replaced with the Unique ID that you configured for a field in s2Member.
// 'MY_CUSTOM_FIELD' => get_user_field('my_custom_field_id', $args->user_id),
));
return $custom_fields;