Hi @giriga – this can be done with a PHP snippet, although it will still take a little bit of work to show exactly what you’re wanting. Here’s how you can display a line of text above the Add to Cart button:
add_action( 'woocommerce_before_add_to_cart_button', 'woo_before_add_to_cart_button' );
function woo_before_add_to_cart_button(){
echo '<div id="before_a2c_container">Your promotional message text.</div>';
}
You could then style this how you’d like using the before_a2c_container
id property with CSS.
– Joey
Thread Starter
giriga
(@giriga)
thanks for the reply, can you tell me where to write all this?
Hi there,
You could add the snippet using the Code Snippets plugin: https://wordpress.org/plugins/code-snippets/
Hey there, since we haven’t heard back from you I’ll mark this thread as resolved now. If you have any further questions, I recommend creating a new thread.