If you’re a webshop owner chances are you’re running a business that gives discounts / sales from time to time. WooCommerce already comes with a great sales feature out of the box which works great. You can even set a specific end date for a specific sale price which will be disabled automatically after that date has passed.
In some scenario’s you may like to disable all sale prices at a certain point, which isn’t possible through a core feature in WooCommerce. The code snippet displayed below will help you to disable (/ re-enable) the sale prices through the entire store at once.
You can use this code snippet by copy/pasting it to your (child) themes functions.php file. Uncomment line 11 to disable the sale prices, and re-comment it do enable the sale prices again.