latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

hook does not seem to fire on user update

Home Forums Community Forum hook does not seem to fire on user update

This topic contains 1 reply, has 2 voices. Last updated by  Cristián Lávaque 3 years, 7 months ago.

Topic Author Topic
Posted: Thursday Jun 6th, 2013 at 10:31 pm #51552
S F
Username: saldm

The hook ws_plugin__s2member_during_handle_profile_modifications is not firing for me. I’ve disabled all plugins other than S2Member. I’ve reverted to the theme twentytwelve and I’ve added the following code to functions.php (on line 24)

I’m getting the hook from the information on http://www.s2member.com/codex/stable/s2member/profiles/package-filters/#src_doc_ws_plugin__s2member_during_handle_profile_modifications

error_log('add_action hook ws_plugin__s2member_during_handle_profile_modifications');
add_action("ws_plugin__s2member_during_handle_profile_modifications", "test_handle_profile_modification");
function test_handle_profile_modification($vars = array()){
  error_log('test_handle_profile_modification');
}

When I update a user’s profile at
http://localhost/wp-admin/user-edit.php?user_id=4362
and click Update User. I see the following in my PHP log file where “test_handle_profile_modification” is not logged.

Marker – Jun 6, 2013 22:25:29
[07-Jun-2013 02:25:32] add_action hook ws_plugin__s2member_during_handle_profile_modifications
[07-Jun-2013 02:25:32] add_action hook ws_plugin__s2member_during_handle_profile_modifications

Of course, this is a simplified case I’ve generated during my troubleshooting after initially noticing the problem.

Any assistance would be greatly appreciated.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Saturday Jun 8th, 2013 at 12:47 am #51648

If I’m not mistaken, that hook is fired when using the s2Member shortcode for profiles. [hilite path]Dashboard -› s2Member® -› API / Scripting -› Member Profile Modifications[/hilite]

For modifications from the dashboard, I’ve found something like this seems to work (change the email address to yours):

[hilite pre_code]
add_action ('show_user_profile', 'email_profile_changes');
add_action ('edit_user_profile', 'email_profile_changes');
function email_profile_changes($user_id) {
if (isset($_GET['updated'])) {
$user = new WP_User($user_id);
wp_mail ('name@domain.com', 'Profile update - ' . $user->user_login, 'testing1');
}
}
[/hilite]
Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.