title: hide product image on single product page
body: <p>I use illustrations for as my product images. However, if you click on an illustration in product archive you get to the single product page. In single product page I want to hide the illustration and show the real image. I tried this from another forum but it is not working...</p>
  <p><a href="http://www.momomai.ch/bento_shop" rel="nofollow noreferrer">www.momomai.ch/bento_shop</a></p>
  <pre><code>add_filter( 'woocommerce_product_gallery_attachment_ids', 'so_31818331_filter_gallery', 10, 2 );
  
  function so_31818331_filter_gallery( $ids, $product ){
      
  if (is_product()) {
          set_post_thumbnail( $post, $ids[0] );
          unset($ids[0]);
      }
      else {
          set_post_thumbnail( $post, end($ids));
      }
      return $ids;
  }
  </code></pre>