Unsure how to tackle this…php?css?

I’m using woocommerce.

When a product is $0, ‘FREE!’ is displayed as the price instead of $0.

I need a way to Not display price IF price=$0.

Don’t know if should be solved with php or css or something else.

Using a child-theme.

Anyone have any ideas?



I have tried with no success:

-http://www.skyverge.com/blog/hide-woocommerce-free-price-label/#comment-3112 (this got rid of FREE! in product previews, but not on product page)

-moving class-wc-product-variation.php(which contains the rule that if price=0, then display FREE!) to child-theme and editing

  • Elliott Bristow
    • The Bug Hunter

    Unfortunately I’m not overly familiar with WooCommerce, but the answer to your specific question is, this will need to be done via PHP, in a similar method to the one suggested in the thread you suggested.

    If the filters they have used in that thread do not change all cases where the price is used, then this would suggest you may be using a different pricing method. Try adding additional filters for the all 5 hooks that link to free prices. They are:






    Looking at your site… I’m guessing the last one is the one you’re looking for, since the product you lined us to is a “variation” product.

    Give it a go… let us know how you get on!

  • Elliott Bristow
    • The Bug Hunter

    Glad we got your “Free!” issue sorted. I’m afraid I’m not really sure when it comes to the Buy Now button. As I say, Woocommerce is not a plugin I am overly familiar with.

    My suggestion would be to scour google and the woocommerce forums for clues. If you find anything relating to the Buy Now buttons that might give us a clue as to how we can hide them under these circumstances…. feel free to post back here and we’ll see if we can find a way to hide them for you.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.