@vieiraadsv
9 years ago
Oh yes, this is just a test code, just to see what was being printed by the function. I put this die because there is redirect after this action.
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);