I am trying to display the user_registered date from get_user_meta but it always displays as empty. If I try another field I do get a value so not sure why I don't see anything for the date. If I check the database there is definitely a date.
$data = array();
$user_query = new WP_User_Query( array( 'meta_key' => 'location', 'meta_value' => $my_location, 'orderby' => 'meta_value_num', 'order' => 'DESC' ));
$authors = $user_query->get_results();
foreach ($authors as $user) {
$register_date = get_user_meta($user->ID, 'user_registered', true);
$data[] = array(
'registered' => $register_date,
);
}
return $data;