Skip to content

Instantly share code, notes, and snippets.

@digitalchild
Last active October 12, 2017 08:48
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save digitalchild/4afc60573d64779d79ea99cc11e8d053 to your computer and use it in GitHub Desktop.
Filter featured products to not show on WC Vendors Pro Dashboard - Products tab.
// Place in your themes functions.php
// Filter products to not show featured products in the vendor dashboard
add_filter( 'wcvendors_pro_table_row_args_product', 'filter_featured' );
function filter_featured( $args ) {
$args[ 'tax_query' ] = array(
array( 'taxonomy' => 'product_visibility',
'field' => 'slug',
'terms' => 'featured',
'operator' => 'NOT IN'
),
);
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment