The “Search products…” WooCommerce form usually appears in the website header and/or the Shop page sidebar based on your theme settings and widget setup.
It usually features an input form with a magnifying glass icon (unless your theme customizes it via CSS), without a visible search button, and on enter it redirects users to the search result page.
Case study: most WooCommerce Ajax Search plugins target the WooCommerce product search form input, so that when you start typing, the “instant search results” window pops up. However, I needed to disable this behavior on certain subsites/languages and the only workaround here was to add a class to the search form input, so that I could target it in my Ajax plugin selector exclusions.
Even if the above scenario is very unlikely, the challenge is still valid. So, how do we customize the HTML of the “Search products…” WooCommerce form (so, not the CSS, but the actual HTML output)? Let’s go!
Continue reading WooCommerce: Customize Product Search Form HTML