title: Redirect single product pages to home in Woocommerce
body: <p>In this e-commerce, its not necessary a single product page, is there a way to redirect these links to my homepage?</p>
  
  <p>I have 3 products pages, /individual-box, /quarterly-box, /semester-box. </p>
  
  <p>I tried something like this:</p>
  
  <pre><code>function redirect_to_home() {
    if(!is_admin() &amp;&amp; is_page('/product')) {
      wp_redirect(home_url());
      exit();
    }
  }
  add_action('template_redirect', 'redirect_to_home');
  </code></pre>