By default, the WooCommerce Search Engine only searches the titles and content of the product description. In order to include the product category in the search, the two following code snippets should be added to the `functions.php` file in theme folder. The first of them creates a class that implements the methods responsible for searching by taxonomy. The second fragment creates a class object for the product category.
If you do not use the child theme, remember that changes made to the
functions.php file will be overwritten when the theme is updated.
While copying code to
functions.php file it is not nessesary to copy
<?php opening tag.