WeDevs\Dokan\Vendor\Manager::all( $args = [] )

Method type #
non-static

Description #
Get all vendors. It calls the get_vendors() method. And its arguments are the same as get_vendors() function.

Parameters #
$args
(array)(optional) Different parameters to get vendors..

  • role__in
    ( array ) array of roles default [ ‘seller’, ‘administrator’ ]
  • number 
    ( integer ) number of posts default 10
  • offset
    ( integer ) Retrieve from id default 0
  • orderby
    ( string ) get vendors by default registered
  • order
    ( string ) show result in ascending or descending default ASC
  • status
    ( array ) vendor status default [ ‘approved’ ]
  • featured
    ( string ) value can be yes or no default ”
  • meta_query
    ( array ) custom meta agruments.
  • fields
    ( string ) default ‘all’

Returns #
( array ) array of all vendors means array of all vendor user information.

More information #

Usage #

$all_vendors = dokan()->vendor->all();

Output #
Returns 10 vendors in an array by default with no arguments.

Leave a Reply

Your email address will not be published. Required fields are marked *