title: Making a Dynamic Facebook OG in Woocommerce
body: <p>in order to have the right image and the right link everytime I share on Facebook, here's what i've done on my Wordpress/Woocommerce header:</p>
  
  <pre><code>    &lt;meta property="og:image" content="&lt;?php the_post_thumbnail_url(); ?&gt;" /&gt;
      &lt;meta property="og:title" content="&lt;?php echo the_title(); ?&gt; by Pixel Komando" /&gt;
      &lt;meta property="og:url" content="&lt;?php echo get_permalink(); ?&gt;" /&gt;
  </code></pre>
  
  <p>Everything works fine in my woocommerce products pages, but when i want to share the Shop Page, the FB debugger shows me this :</p>
  
  <p>URL : <a href="https://www.pixelkomando.com/shop" rel="nofollow noreferrer">https://www.pixelkomando.com/shop</a></p>
  
  <p>Meta tag og:url <a href="https://www.pixelkomando.com/shop/CATEGORY/PRODUCT/" rel="nofollow noreferrer">https://www.pixelkomando.com/shop/CATEGORY/PRODUCT/</a></p>
  
  <p>It seems it works correctly everywhere except on the Shop Page itself. Instead of retrieving the Shop Page URL, it gives the URL of a random product.</p>
  
  <p>I dont really know what is wrong.</p>
  
  <p>Regards
  Fero</p>