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.

  • Jeroen Sormani

    I'm a professional WordPress plugin developer on a mission to create the best plugins for my clients. I'm specialised in developing general WordPress, WooCommerce and Easy Digital Downloads plugins.

    Interested in talking about a WordPress project? Get in touch!

    Follow me on Twitter
  • 3 thoughts on “Disable product sale prices store-wide

    Bojan April 16, 2016 at 1:07 pm

    Thank you very much for this code.

    I googled for an hour and finally I found this topic.

    It work fantastic.

    William Genske September 25, 2016 at 2:43 am

    Thanks very much for your post and for the code.

    I have added this code seemingly successfully, and it seems to work on “simple products” , but it is still showing “SALE” on all “variable” items.

    I’m wondering what additional lines of code would be needed to disable the “Sale” prices to be show?

    Thank you very kindly.


    Jeroen September 25, 2016 at 9:19 pm

    Hi William,

    I haven’t tried it with variable products, but I think you can copy the code above, do a search and replace for:
    – ‘woocommerce_get’ -> ‘woocommerce_get_variation_’

    Run that aside from the other code above.

    Again, I haven’t tested it, so be sure you know what you’re doing 😉


    Leave a Reply