Change the “Add to Cart” Button Text in WooCommerce

One of the most common requests is that users want to change the “Add to Cart” text on their WooCommerce installations. Although there isn’t a built-in way to do this, we can achieve it through some quick functions – just copy the text below into your functions.php file. Then, change the “Buy Now” text to whatever you’d like to display.

Change Text on Single Product Pages

The following function will change the button text on single product pages.

add_filter( 'add_to_cart_text', 'woo_custom_cart_button_text' );// < 2.1
add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' );// 2.1 +

function woo_custom_cart_button_text() {

return __( 'Buy Now', 'woocommerce' );

}

Change Text on Product Archives / Shop Page

The following function will change the button text on archive pages like the Shop page or category pages. It can be used in conjunction with the function above.

add_filter( 'add_to_cart_text', 'woo_custom_cart_button_text' );// < 2.1
add_filter( 'woocommerce_product_add_to_cart_text', 'woo_custom_cart_button_text' );// 2.1 +

function woo_custom_cart_button_text() {

return __( 'Buy Now', 'woocommerce' );

}

Have any questions or comments about this article, or ways you think it can be improved?
Join the conversation in the comments below, or sign up for my newsletter to recieve periodic updates!

Tags: , , , ,

3 Responses to “Change the “Add to Cart” Button Text in WooCommerce”

  1. neneh January 8, 2015 at 13:32 EDT (1:32 PM) #

    It worked. Thank you!

  2. Danny Santoro January 9, 2015 at 10:27 EDT (10:27 AM) #

    I’m glad it helped! If you have any specific requests for follow-up guides, let me know 🙂

  3. Rupom March 13, 2015 at 01:44 EDT (1:44 AM) #

    If you feel you can install : https://wordpress.org/plugins/woo-button-text/ this plugin do its duty to easily change the button name.

Leave a Reply

%d bloggers like this: