title: Disable WooCommerce shop page completely, but keep search page
body: <p>I have an issue with WooCommerce. I want to disable the shop page completely, but I still want users to be able to search for products.</p>
  
  <p>This is what I have now - it works, but it also disables the search page, as this uses the shop page.</p>
  
  <pre><code>function woocommerce_disable_shop_page() {
      global $post;
      if (is_shop()):
      global $wp_query;
      $wp_query-&gt;set_404();
      status_header(404);
      endif;
  }
  add_action( 'wp', 'woocommerce_disable_shop_page' );
  </code></pre>
  
  <p>Hope you can help.</p>