title: Display in Woocommerce the product price per gram
body: <p>On single product pages I'm trying to display the product price per gram. So, price divided by weight.</p>
  <p>I can echo the price without currency symbol:</p>
  <pre><code>&lt;?php global $post; $product = new WC_Product($post-&gt;ID); echo wc_price($product-&gt;get_price_including_tax(1,$product-&gt;get_price())); ?&gt;
  </code></pre>
  <p>I can also echo the weight without 'g':</p>
  <pre><code>&lt;?php global $product; $attributes = $product-&gt;get_attributes(); if ( $product-&gt;has_weight() ) { echo $product-&gt;get_weight();} ?&gt;
  </code></pre>
  <p>I know how to create a simple calculation:</p>
  <pre><code>&lt;?php $first_number = 10; $second_number = 20; $sum_total = $second_number / $first_number; print ($sum_total); ?&gt;
  </code></pre>
  <p>But unsure how to put it all together!</p>