Add Text Before and After Add to Cart

Order by price, date or title on shop page WooCommerce support to any WordPress theme:

// Before Add to Cart Button: Can be done easily with woocommerce_before_add_to_cart_button hook, example:
add_action( ‘woocommerce_before_add_to_cart_button’, ‘before_add_to_cart_btn’ );
function before_add_to_cart_btn(){
   echo ‘Some custom text here’;
// After Add to Cart Button: If you are going to add some custom text after “Add to Cart” button, woocommerce_after_add_to_cart_button hook should help you. Example of usage this hook
add_action( ‘woocommerce_after_add_to_cart_button’, ‘after_add_to_cart_btn’ );
function after_add_to_cart_btn(){
    echo ‘Some custom text here’;

Leave a Reply

Your email address will not be published. Required fields are marked *