title: how to edit the output of price in woocommerce/wordpress
body: <p>Like the title says I want to get rid of the decimals after my price.</p>
  
  <p>It now looks like this <strong>8.00</strong> but it should be <strong>8</strong>.</p>
  
  <p>i tried trim() and substr($price_html,1,1) but nothing happened</p>
  
  <p><strong>my code:</strong></p>
  
  <pre><code>&lt;?php if ( $price_html = $product-&gt;get_price_html() ) : ?&gt;
              &lt;span class="price"&gt;PREIS:&lt;span class="amount"&gt;
  &lt;?php echo $price_html; ?&gt;&lt;/span&gt;&lt;/span&gt;&lt;p class="stock-m13"&gt;&lt;?php echo $product-&gt;get_stock_quantity(); ?&gt;stk.&lt;/p&gt;
  &lt;?php endif; ?&gt;
  </code></pre>
  
  <p>any ideas how I can cut of the .00 from the price output(js? manipulate the mysqli query?)</p>
  
  <p>EDIT: i dont have the option "remove zeros" in my wp/woocommerce backend(for those who will ask) </p>
  
  <p><strong>SOLUTION from danyo:</strong></p>
  
  <pre><code>$price_html = $product-&gt;get_price_html();
  $new_price = preg_replace('/.00/', '', $price_html);
  </code></pre>