To show the wc_price() without formatted HTML use the following function:
<?php
/**
* Returns the wc_price without html tags
*/
function th_wc_price_unformatted( $price = 0 ) {
return html_entity_decode( strip_tags( wc_price( $price ) ) );
}
?>
To show the wc_price() without formatted HTML use the following function:
<?php
/**
* Returns the wc_price without html tags
*/
function th_wc_price_unformatted( $price = 0 ) {
return html_entity_decode( strip_tags( wc_price( $price ) ) );
}
?>
I'm Robbert Vermeulen. I document everything I learn and help thousands of people with coding WordPress. My site has no ads or sponsors. If you enjoy my content, please consider supporting what I do.
Feel free to ask questions or make comments.
No comments yet..