PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
250 List_MergeFieldRequired
'MERGE1' => '[ FIRST NAME ]',
'MERGE2' => '[ LAST NAME ]',
'OPTIN_IP' => '[ IP ADDRESS ]',
'OPTIN_TIME' => '[ DATE AND TIME ]'
<?php
add_filter("ws_plugin__s2member_mailchimp_merge_array", "my_filter");
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. */
$user_id = $vars["user_id"];
// print_r($vars); // Lots of good stuff in this array.
$user_custom = get_user_option("s2member_custom", $user_id);
$my_custom_merge_vars = array("S2_CUSTOM" => $user_custom);
return array_merge($merge, $my_custom_merge_vars);
}
?>
<?php
add_filter("ws_plugin__s2member_mailchimp_merge_array", "my_filter");
function my_filter($mergeVars)
{
$my_custom_elements = array('MERGE3' => 'addr1', 'MERGE7' => 'city');
return array_merge($mergeVars, $my_custom_elements);
}
?>
$s2_custom_fields = get_user_option('wp_s2member_custom_fields', $user_id);
Users browsing this forum: Google [Bot] and 1 guest