Reply To: How to trigger hooks on member profile update?
I have solved the issue by myself. I think the action xprofile_updated_profile has worked all the time. It has a redirect after this action so I was not seeing its update, that was what happened. Follow my debug code below:
function updateSubscribe( $user_id, $posted_field_ids, $errors, $old_values, $new_values )
{
if ( empty( $errors ) )
{
echo "<pre>";
//print_r( $posted_field_ids );
echo "<br>user id: " . $user_id . "<br>";
echo "<b>Old values</b><br>";
print_r($old_values);
echo "<b>New values</b><br>";
print_r($new_values);
echo "</pre>";
}
die("END");
}
add_action('xprofile_updated_profile', 'updateSubscribe', 1, 5);