The PHP snippet to show text above Add to Cart button:

/**
 * @snippet       Adds notice at single product page above add to cart
 * @how-to        Watch tutorial @ https://businessbloomer.com/?p=19055
 * @sourcecode    https://businessbloomer.com/?p=349
 * @author        Rodolfo Melogli
 * @testedwith    WooCommerce 3.2.6
 */
add_action( 'woocommerce_single_product_summary', 'return_policy', 20 );
function return_policy() {
    echo '<p class="prasanna">Your Policy terms and content should go here</p>';
}

The CSS customization for anywhere in css

As you may have noticed, the HTML paragraph tag has an “id” so that you can style it via CSS. In my example I wrote this in the custom.css file:

.prasanna {
text-align: center;
font-style: italic;
}
You must be logged in to post a comment.