Show the Results Page for Single-Match Product Searches
Stops WooCommerce from jumping straight to a product when a search has only one match, so shoppers always see the search results page.
Opens WPIDE on
Code
add_filter( 'woocommerce_redirect_single_search_result', '__return_false' );
Notes
""
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.