Last active
September 14, 2020 05:07
-
-
Save nayemDevs/dcecdde441be65780133c959cf5476d7 to your computer and use it in GitHub Desktop.
Exclude specific vendor by ID from store-list page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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