WC_Widget_Brand_Nav::filter_out_cats
Filter out all categories and not display them
Method of the class: WC_Widget_Brand_Nav{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Widget_Brand_Nav = new WC_Widget_Brand_Nav(); $WC_Widget_Brand_Nav->filter_out_cats( $cat_args );
- $cat_args(array) (required)
- Category arguments.
WC_Widget_Brand_Nav::filter_out_cats() WC Widget Brand Nav::filter out cats code WC 10.4.3
public function filter_out_cats( $cat_args ) {
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
if ( ! empty( $_GET['filter_product_brand'] ) ) {
return array( 'taxonomy' => '' );
}
return $cat_args;
}