title: woocommerce update price with tax amount
body: <p>Woocommerce displays prices without tax added. There is an option to display prices with tax added, but only if you enter them with tax added in the backend.</p>
  
  <p>This project requires showing the price including tax as well as the amount of tax on product category and single pages. The price and tax amount needs to be updated when product variants are selected. It also needs to pull the tax value from the system dynamically, so that when the tax rate is updated in the backend the frontend reflects the change.</p>
  
  <pre><code>&lt;?php
  /**
   * Single Product Price, including microdata for SEO
   *
   * @author      WooThemes
   * @package     WooCommerce/Templates
   * @version     1.6.4
   */
  
  global $post, $product;
  ?&gt;
  
  &lt;div itemprop="offers" itemscope itemtype="http://schema.org/Offer"&gt;
  
  &lt;p itemprop="price" class="price"&gt;&lt;?php echo $product-&gt;get_price_html(); ?&gt;&lt;/p&gt;
  
      &lt;?php 
      $price = $product-&gt;get_price();
      $vat = number_format( $product-&gt;get_price()*0.20, 2, '.', ','); 
      $pricePlusVat = number_format( $price + $vat, 2, '.', ',');
      ?&gt;
  
      &lt;p class="rrp"&gt;&lt;?php echo $rrp; ?&gt;&lt;/p&gt;
  
      &lt;p itemprop="price" class="price"&gt;
          &lt;span class="price-label"&gt;Our Price:&lt;/span&gt;
          &lt;span class="full-price"&gt;&amp;pound;&lt;?php echo $pricePlusVat; ?&gt;&lt;/span&gt;
          &lt;br/&gt;
          &lt;span class="vat-label"&gt;inc. VAT 20% ( &amp;pound;&lt;?php echo $vat; ?&gt; )&lt;/span&gt;
      &lt;/p&gt;
  
      &lt;link itemprop="availability" href="http://schema.org/&lt;?php echo $product-&gt;is_in_stock() ? 'InStock' : 'OutOfStock'; ?&gt;" /&gt;
  
  &lt;/div&gt;
  </code></pre>