Which hooks to fire on s2Member-Profile save?

I want to process members custom fields to ensure their data is all in order, so does anyone know which hooks are best placed to call in these situations?

  1. After a users account is created

  2. After the s2Member-Profile is saved

I think if I fire the same do_action after these two situations it should cover almost all circumstances.

Thoughts anyone?

User profile modification

on line 162 of wp-content/plugins/s2member/src/includes/classes/profile-mods-in.inc.php

do_action('ws_plugin__s2member_after_handle_profile_modifications', get_defined_vars());

which can be called with

add_action('ws_plugin__s2member_after_handle_profile_modifications', 'called_user_modification_function_name', 10, 2 );

function called_user_modification_function_name($defined_vars)
{

}

User profile creation/registration

on line 1250 of wp-content/plugins/s2member/src/includes/classes/registrations.inc.php

do_action('ws_plugin__s2member_after_configure_user_registration', get_defined_vars());

which can be called with

add_action('ws_plugin__s2member_after_configure_user_registration', 'called_user_registration_function_name', 10, 1 );

function called_user_registration_function_name($defined_vars)
{

}
1 Like

Maybe one of these is useful:

https://www.s2member.com/forums/topic/hooks-new-user-registration-update-member/index.html#post-28308

1 Like

this one is also useful and fires immediately after an existing user profile is updated.

1 Like