Disable redirect to product page instead of search results page

If there is only one search result then WooCommerce will redirect the user directly to the product page. This is a WooCommerce feature. You can disable it by applying the following snippet:

add_filter( 'woocommerce_redirect_single_search_result', '__return_false' );

You have two ways to add this code to your theme:

  1. Open the functions.php in your Child Theme and add the code at the end
  2. Install the Code Snippets plugin and apply this code as a snippet