I\'m busy with a wordpress/woocommerce site and I\'d like to hide the price of an item when it\'s zero on the product category/archive page.
I\'ve tried looking on the
This code works with Woocommerce 3.6.3. Copy into your functions.php
//Hide Price when Price is Zero
add_filter( 'woocommerce_get_price_html','maybe_hide_price',10,2);
function maybe_hide_price($price_html, $product){
if($product->get_price()>0){
return $price_html;
}
return '';
}
// End of above code