Answers for "woocommerce if product page"

1

is product page woocommerce

if( is_product() ) {
	// do something
} else {
 
}
Posted by: Guest on October-14-2021
0

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;
}
Posted by: Guest on December-10-2020

Code answers related to "woocommerce if product page"

Browse Popular Code Answers by Language