dflomin
Forum Replies Created
-
Saving doesn’t work. Sorry, maybe a newbie mistake here –
$user = $vars['user'];Shouldn’t vars carry over any variables used by s2member in the hook? In this case, the user -> ID for the option updates.
At any rate, I did some more research and discovered this hook:
ws_plugin__s2member_before_custom_field_genThis guide indicates that adding my field (or simply modifying an s2member profile field via php) through this hook would basically add it to all relevant functions – saving, editing, etc.. I emulated what Jason is doing here and it doesn’t appear to do anything at all, though…
So, this does print out the dropdown list on the bottom of the user edit page on the admin end, which is very cool! However saving them doesn’t appear to have any effect 🙁
Here’s a snippet of the save function:
$_p = stripslashes_deep($_POST); if (!empty($_p['xp_category']) && is_string($_p['xp_category'])) update_user_option($user->ID, 'xp_category', esc_html($_p['xp_categories']));In addition, I notice that adding a new user from the admin end doesn’t show the fields – would you or anyone else happen to know the correct s2member hook for this one? Thanks!
Sorry for the delay, thanks again for the response. I’ll be trying this today/tomorrow to see how it works! Currently I semi-resolved the issue by creating the fields in s2member, hiding them with css, and adding the same ID names to my custom fields, but obviously this isn’t exactly a good solution.
Thanks very much for the reply!
Would you be able to provide a link/guide on how to do that? I’ve no clue how to do this 🙁