title: Displaying two decimal price rounded with one decimal in Woocommerce
body: <p>Been working on a message that informs the customer about the shipping and if he/she spends another XX dollars, free shipping will be available.</p>
  
  <p>I've used various hooks as to where this is displayed (product page, cart, checkout etc) but what I am having real trouble with is how to round the cost off.</p>
  
  <p>It is set to offer free shipping if customer spends at least 59 dollars. But if the customer add products for <code>58.xx</code> the message will show as, <code>"Spend 0.1223242 dollars more and get free shipping"</code>.</p>
  
  <p>How do I change that into TWO decimals and how do I make it understand that <code>0.1223</code> equals <code>0.10</code> and that <code>0.15544</code> equals <code>0.2</code> and so forth? (I hope this is clear and easy enough to understand).</p>
  
  <p>Here is the code I use:</p>
  
  <pre><code>function show_shipping_message() {
      global $woocommerce;  
      $total_cart = $woocommerce-&gt;cart-&gt;total;
      $limit_free_shipping = 59;
  
      if ($total_cart != 0 &amp;&amp; $total_cart &lt; $limit_free_shipping) { 
      $dif = $limit_free_shipping - $total_cart;
  
      ?&gt;
      &lt;p class="free-shipping-notice" &gt;
      &lt;img src="&lt;?php echo get_stylesheet_directory_uri(); ?&gt;/images/shipping-icon.png"&gt; &lt;?php _e('TEXT', THEME_TEXT_DOMAIN); ?&gt; &lt;?php echo $dif; ?&gt; &lt;?php _e('dollar, TEXT', THEME_TEXT_DOMAIN); ?&gt; &lt;strong&gt;&lt;?php _e('TEXT', THEME_TEXT_DOMAIN); ?&gt;&lt;/strong&gt;
      &lt;/p&gt;
  
      &lt;?php
      } 
      }
  </code></pre>
  
  <p>If someone can help then I would be very grateful. Thanks in advance. If any one knows how to make it auto-update after removing an item from the mini-cart that would be very good. Again, thanks in advance.</p>