I have one issue. How to show notice or text , in product page, only for selected products?
i know that must to insert some function in functions.php, but dont know how to do that. Can anyone give me some dirrections? Thanks
I found this function:
// adds notice at single product page above add to cart
add_action( 'woocommerce_single_product_summary', 'return_policy', 20 );
function return_policy() {
echo '<p id="rtrn">30-day return policy offered. See Terms and Conditions for details.</p>';
}
and CSS:
#rtrn {
text-align: center;
font-style: italic;
}
This function show message in every product, but i need only in selected products..
so how to show this message only on selected products? How to select products where message need to be showed?
Find the id of the product you want the message to appear by hovering on the product name in your product listings or by looking at the URL while editing the product and add the following code in your functions.php file