📅  最后修改于: 2022-03-11 14:53:37.791000             🧑  作者: Mango
//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