Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_filter( 'wcfm_sell_items_catalog_args', function( $args ) {
- if( isset( $args['author__not_in'] ) ) {
- $vendors = wp_list_pluck( get_users(
- array( 'role__in' => array( 'wcfm_vendor' ) )
- ), 'ID' );
- if( !empty( $vendors ) ) $args['author__not_in'] = $vendors;
- }
- return $args;
- } );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement