Last active
September 11, 2019 15:04
-
-
Save stevenroh/2fc6157ec97d68354641616ea12bbd0a to your computer and use it in GitHub Desktop.
Hide price for product that costs zero
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Hide price for product that costs zero | |
function rohs_hide_zero_price($price_html, $product){ | |
if($product->get_price()>0){ | |
return $price_html; | |
} | |
return ''; | |
} | |
add_filter( 'woocommerce_get_price_html','rohs_hide_zero_price',10,2); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment