Hi sometimes I use in woocommerce products without price and I want add to empty price label or add a new label with a text “not available”
I try to make a hook but I’m not lucky and my skills are low.
The condition would be something:
if( $product->get_price() == 0 || $product->get_price() == '') {
echo '<p class="label_not_available">Not Available</p>';
}
Thanks in advance
Thanks for preview answer, it’s helped to make the hook with a correct syntax. Exactly I was looking to make this, and I think that work fine.
I don’t use free price because it is result of an API that returns the value price set = 0 sometimes when a product not available.
Thank you very much
Try this if it helps you.
See Description Here.