title: product gallery attachment url in woocommerce
body: <p>I'm using this snippet to output the product gallery attachments on a custom wordpress template for a woocommerce site. I'm using a lightbox for the popup. But I struggling to get the attachment url, instead it keeps on using the featured image the pop-up.</p>
  
  <pre><code>&lt;?php
  global $product;
  $attachment_ids = $product-&gt;get_gallery_attachment_ids();
  
  $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post-&gt;ID), 'thumbnail_size' );
  $url = $thumb['0']; 
  
  
  echo '&lt;div&gt;';
  foreach( $attachment_ids as $attachment_id ) 
  {
  echo '&lt;a href="' . $url . '" rel="shadowbox" &gt;' ."&lt;img src=".$image_link = wp_get_attachment_url( $attachment_id, 'large')." style='width:70px; height:70px;' &gt;". '&lt;/a&gt;';
   }
  echo '&lt;/div&gt;';
  ?&gt;
  </code></pre>
  
  <p>Any ideas on how to target the correct url path for the product gallery images?
  Any help much appreciated!</p>