WC price without formatting

To show the wc_price() without formatted HTML use the following function:

 * 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.


    No comments yet..

Leave a reply

Feel free to ask questions or make comments.