hi
the last function was:
/**
* Get seller listing
*
* @param array $args
*
* @return array
*/
function dokan_get_sellers( $args = array() ) {
$defaults = array(
‘role__in’ => array(‘seller’,’administrator’),
‘number’ => 10,
‘offset’ => 0,
‘orderby’ => ‘registered’,
‘order’ => ‘ASC’,
‘meta_query’ => array(
array(
‘key’ => ‘dokan_enable_selling’,
‘value’ => ‘yes’,
‘compare’ => ‘=’
)
)
);
$args = wp_parse_args( $args, $defaults );
$user_query = new WP_User_Query( $args );
$sellers = $user_query->get_results();
return array( ‘users’ => $sellers, ‘count’ => $user_query->total_users );
}
and the new is:
/**
* Get seller listing
*
* @param array $args
*
* @return array
*/
function dokan_get_sellers( $args = array() ) {
$vendors = dokan()->vendor;
$all_vendor = wp_list_pluck( $vendors->all( $args ), ‘data’ );
return array( ‘users’ => $all_vendor, ‘count’ => $vendors->get_total() );
}
where to put the change ?
thank you