WooCommerce customization – Display Free instead of zero

Home » Old posts » WooCommerce customization – Display Free instead of zero

WooCommerce customization – How to display Free instead of zero

woocommerce-customization

If you are using WooCommerce which is by far  my E-Commerce plugin of choice for WordPress , then sometimes you’ll run into the issue where you want to use the word “FREE” as the price when a product price is  set to $0.

Here is the code to do it,  just drop it into your functions.php file in your theme.

add_filter('woocommerce_free_price_html', 'changeFreePriceNotice', 10, 2);

function changeFreePriceNotice($price, $product) {
	return 'FREE';
}

WooCommerce customization – How to display Free instead of zero

 

Nikola fivera Petrovic
Get in Touch

Nikola fivera Petrovic

Hi there. My name is Nikola,
I speak English, Greek and Serbian.
As a Web Producer i can deal with almost anything web design & development related.

Web Design Skills

I have been into web design for the last 10+ years.
After working for various agencies and companies I have decided to take a lone wolf path as a Freelancer but I still actively collaborate with agencies across the globe.
I enjoy building websites on WordPress platform but i can work on any other platforms as well.

SEO Skills

I have spent a last couple of years as an SEO executive and SEO consultant working on 4 continents.
Specialized in on-page SEO I wear a pointy Google-Wizard White-Hat and help various small and medium-sized businesses rank well in the search engines.
I enjoy working with Google and Yahoo SE.
Feel free to request a free meeting bellow.
As a freelancer, I charge only a small portion of the money you would pay to agencies to get your project done.
Nikola fivera Petrovic
Get in Touch
2017-04-16T04:15:44+00:00

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz