Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • vieiraadsv
    Participant

    @vieiraadsv

    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.


    vieiraadsv
    Participant

    @vieiraadsv

    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);
    
Viewing 2 replies - 1 through 2 (of 2 total)
Skip to toolbar