Skip to content

Instantly share code, notes, and snippets.

@nayemDevs
Last active September 14, 2020 05:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nayemDevs/dcecdde441be65780133c959cf5476d7 to your computer and use it in GitHub Desktop.
Save nayemDevs/dcecdde441be65780133c959cf5476d7 to your computer and use it in GitHub Desktop.
Exclude specific vendor by ID from store-list page
<?php
/**
* Exclude admin roles from vendor query
*
* @param $seller_args
* @return mixed
*/
function exclude_some_sellers_users( $seller_args ) {
$seller_args['role__in'] = array( 'seller' ); // add here roles
return $seller_args;
}
add_action( 'dokan_rest_get_stores_args', 'exclude_some_sellers_users', 10 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment