Hi there,
In order to do that, you’ll need to change the product search widget from WooCommerce. Storefront uses that widget through the get_product_search_form()
function. The HTML can be changed by using a filter. Like so:
add_filter( 'get_product_search_form', 'get_custom_product_search_form', 10, 1 );
/*
* Overrides WooCommerce default product search form.
*
* @param string $form Form default HTML markup.
*
* @return string
*/
function get_custom_product_search_form( $form ) {
$form = str_replace( '<input type="hidden" name="post_type" value="product" />', '', $form );
return $form;
}
Basically, this filter will remove the post_type
input, resulting in a general search on the website.
Note: Searching for other types of posts, not only products, will change the search results appearance in Storefront.
I hope this helps.
Best,
Ricardo