September 16, 2020
Simple function to check is WooCommerce Product is virtual. Can be used in the Cart or on Product page.
<?php if ($product-> is_virtual('yes')) { ?>
<p><strong>Digital product: Be advised that digital products cannot be returned, refunded, or exchanged.</strong></p>
<?php } ?>