Created by Michael Visser 2017-07-22 View revision File functions.php Added Side-by-side diff More Ignore whitespace Hide word diff +<?php + +// Conditionally display a persistent notice on the Single Product screen +function custom_woocommerce_before_main_content() { + + // Check that we are on the Single Product screen + if( !is_product() ) + return; + + $text = 'Hi there, if you have any questions get in touch!'; + echo ' +<div class="woocommerce-info"> + ' . $text . ' <strong>:)</strong> +</div> + '; + +} +add_action( 'woocommerce_before_main_content', 'custom_woocommerce_before_main_content' ); + +?>