title: Display woocommerce variable product price
body: <p>How to display woocommerce variable price for current active variation on single product page?
  I use the code:</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php 
  global $product;
  if ($product-&gt;is_type( 'simple' )) { ?&gt;
    &lt;p class=&quot;price&quot;&gt;&lt;?php echo $product-&gt;get_price_html(); ?&gt;&lt;/p&gt;
  &lt;?php } ?&gt;
  &lt;?php 
  if($product-&gt;product_type=='variable') {
    $available_variations = $product-&gt;get_available_variations();
    $variation_id=$available_variations[0]['variation_id']; // Getting the variable id of just the 1st product. You can loop $available_variations to get info about each variation.
    $variable_product1= new WC_Product_Variation( $variation_id );
    $regular_price = $variable_product1 -&gt;regular_price;
    $sales_price = $variable_product1 -&gt;sale_price;
    echo $regular_price+$sales_price;
    }
  ?&gt;
  </code></pre>
  <p>But it shows only lowest variable price instead of currently selected variation's price.
  Any ideas how to display current price for active variation?</p>