[ad_1]
The entire source code in which this is executed would be helpful. Probably the 2nd parameter is set incorrectly. But at the moment we can only guess.
XXXXXXXXX is where I need to print:
add_action( 'show_user_profile', 'my_show_extra_profile_fields' );
add_action( 'edit_user_profile', 'my_show_extra_profile_fields' );
add_action( "user_new_form",'my_show_extra_profile_fields' );
function my_show_extra_profile_fields( $user ) { ?>
.....
.......
<table>
<h1 id="prezzo_settimana">Listino prezzi</h1>XXXXXXXX</table><br></br>
<table>
show_user_profile specifies the WP_User object as the 1st parameter. Actually, everything you are looking for is already contained there.
Example:
echo $user->display_name;
