I want to get all users with their respective data. I already get all the users:
$users = array();
$users_query = new WP_User_Query( array(
'role' => 'subscriber',
'orderby' => 'user_registered',
'number' => 8,
'order' => 'DESC',
'fields' => array('ID', 'display_name')
) );
$results = $users_query->get_results();
But I only get the data from user table:
object(stdClass)#3162 (10) {
["ID"]=>
string(2) "44"
["user_login"]=>
string(13) "usuarioprueba"
["user_nicename"]=>
string(13) "usuarioprueba"
["user_url"]=>
string(0) ""
["user_registered"]=>
string(19) "2016-10-13 16:27:56"
["user_status"]=>
string(1) "0"
["display_name"]=>
string(14) "Usuario Prueba"
} ...
How do I get also the data from usermeta
without having to use a loop like a foreach