How to limit search results to WooCommerce products

WordPress’ default search will return all of the pages, posts, and products that match the specified search phrase. This snippet will filter search results so that only WooCommerce products are