I am using:

How to show percentage or saved amount for WooCommerce product sale price

WooCommerce default display for sale price did not catch my eye as there are no mention about how many percentage or how much you saved which is the main attraction for most of the potential customers.

I will share 2 code snippet below so that you can use to optimize the display of the sale price at WooCommerce overview and product page.

I put the above code in functions.php of my child theme, entered a sold out price for a product and nothing to see on the front end. I mean, sold out price is showed correctly but no info as shown on the screens above.

I have a woocommerce dynamic pricing plugin but added to it a code that turns off the global discount rule on a given product when sold out price is given, so I hoped it will work then, but nothing.