I'd like to display the sale price of a product before the regular (discounted) price. I know this has something to do with get_price_html. By default, this outputs something like:
<del>regular price</del>
<ins>sale price</ins>
I want to change the output so it looks like this (basically, the two prices are shown in a different order):
<ins>sale price</ins>
<del>regular price</del>
How can I do this?
UPDATED 16th Feb 2018
Here is the code:
For WooCommerce version
2.6.xor belowFor WooCommerce version
3.0or aboveCode goes in
functions.phpfile of your active child theme (or theme). Or also in any plugin php files.Code is tested and works.
Hope this helps!