I’m getting tired but I think I am doing this correctly … Here is what I have in my s2-hacks.php file.
<?php
/*GET USERS CUSTOM FIELDS ETC*/
add_action("ws_plugin__s2member_during_configure_user_registration", "my_function");
function my_function($vars_from_s2member = array())
{
extract($vars_from_s2member);
/* Here are a few variables now available to you here.
$role (s2member_level1, s2member_level2, etc)
$level = (level number of access now granted)
$email, $login, $ip, $custom, $subscr_id, $subscr_gateway
$fname, $lname, $name, $pass, $user_id (WP User ID), $ccaps
$user (a WP_User_object), $user->ID (the User's ID in WordPress)
$fields (an array of Custom Registration Fields for s2Member) */
var_dump($fields);
echo "First Name: ";
echo $fname;
echo $role;
echo $level;
echo $email;
echo $login;
}
?>
Then in one of my pages php template I am calling:
<?php do_action("ws_plugin__s2member_during_configure_user_registration", "my_function"); ?>
What I am getting is:
NULL First Name:
What am I doing wrong?