This snippet will help you strip down the price markup from WooCommerce. On a recent project I used this to add <sup></sup> to the last two decimals for the shopping basket in the header. However you could use this for a number of things.
// Get the total of the cart $total = $woocommerce->cart->get_cart_total(); // Split the total $price = explode('.', $total); // Echo out the new total with <sup> echo "$price.<sup>$price</sup>";
Really simple and quite useful.
I hope you find this tip useful. If you have any comments or would like to know more, please leave me a comment and I will get back to you.
Welcome to our AG Bot, powered by OpenAI and trained on our documents and product pages. By continuing to use this service, please keep in mind: