woocommerce show product in page code example

Example: if simple product display enquiry button woocommerce code your own

if ( ! $product->is_purchasable() ) {
?>
<script type="text/javascript" language="JavaScript"><!--
function ShowHide(d) {
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}
//--></script>
<a href="javascript:ShowHide('product-inquiry-form')">
<h2 class="button">Product Inquiry Form</h2>
</a>
<div id="product-inquiry-form" style="display:none;">
<div style="clear:both;">
<?php echo do_shortcode( '[contact-form-7 404 "Not Found"]' ); ?>
</div>
</div>
<?php
return;
}

Tags:

Misc Example