Snippets: Custom columns for specific WooCommerce category

// Custom columns for specific WooCommerce category
add_filter( 'wpex_loop_shop_columns', function( $columns ) {
	if ( is_tax( 'product_cat', 'courses' ) ) {
		$columns = 2;
	}
	return $columns;
}, 99 );

Version Required:5.3.1+

Snippet Type: PHP

Posted Under: WooCommerce

All PHP snippets should be added via a child theme's functions.php file or via the Code Snippets Plugin (or alternative plugin)