How to exclude categories from the search?

The categories terms are displayed during a live search when the “Show categories” option is enabled:

It’s possible to exclude certain categories from a live search. The solution requires custom PHP code. To implement it correctly, you have to know the IDs of the categories you want to exclude. You can read the category ID from the URL when you are on the category edit page.

Custom code

add_filter( 'dgwt/wcas/search/product_cat/args', function ( $args ) {
	$args['exclude'] = array(999, 1000, 1001); // The IDs of categories to exclude

	return $args;
} );

Learn how to add this snippet to your WordPress.

If you use the Pro plugin version, remember to rebuild the search index afterwards:

Go to WooCommerceFiboSearchIndexer (tab) and rebuild the search index. Wait for this process to finish.