I'm trying to show a warning in a woocommerce theme when the product is out of stock. Something similar to this
<?php if ('this_product_is_out_of_stock'): ?>
<p>This product is out of stock. It can be purchased by custom made order.</p>
<?php endif; ?>
How can I show "this product is out of stock" Is there a function for this or any other method?