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' );
}

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

Comments are closed.