It is possible to show the word “FREE” as the price instead of $0.00 in WooCommerce when the product is actually free.

Showing the word Free instead of $0.00 is more noticeable to users and less confusing especially when just want to add some free products or gifts for your customers to choose from.

All you need to do is add the following code snippet to your theme’s function.php file:

/**
* @snippet       Display FREE if Price Zero or Empty - WooCommerce Single Product
* @author        Vigilante Marketing
* @testedwith    WooCommerce 3.8
*/
  
add_filter( 'woocommerce_get_price_html', 'vm_price_free_zero_empty', 9999, 2 );
   
function vm_price_free_zero_empty( $price, $product ){
    if ( '' === $product->get_price() || 0 == $product->get_price() ) {
        $price = '<span class="woocommerce-Price-amount amount">FREE</span>';
    }  
    return $price;
}
Share Article

Related Articles

WooCommerce

WooCommerce Analytics

Tools + Resources

The Evolution of Digital Marketing

Finding Your Domain Registrar

Double the Silver, Double the Honor: Vigilante Marketing Celebrates Best of Kelowna Wins!

Tools We Use For Running Our Team Online

8 Mistakes to Avoid in Your Content Marketing Strategy for 2023

5 Work From Home Tips & Tricks

We’re Honored: Vigilante Marketing Nominated for Best of Kelowna 2025

Navigating Modern Marketing Challenges in Complex Industries & How Vigilante Marketing Leads the Way

LinkedIn Ads vs Google Ads in 2025: Which One Should You Use (or Both)?

7 Steps to Build an Outstanding Content Marketing Strategy

Still haven’t found what you’re looking for?

Let us know and we’ll do our best to help out!

sit back and relax

We have monthly site maintenance options to ensure that your website is running smoothly.

Website development post-launch support and resources
Secret Link
SHARE YOUR CART