Change “Add to Cart” Button Text in WooCommerce

Did you know that you can change the text on the “Add to Cart” button in WooCommerce? It’s a small change, but it can make a big difference in how customers interact with your site. In this post, we’ll show you how to customize the text on the “Add to Cart” button.

Changing the default text is suitable for different countries for example, for Spain could be “Añadir al carrito” and for Germany “In den Warenkorb”.

There are 2 places you need to modify the text: on a single product page and its archive pages.

// To change add to cart text on single product page
add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_single_add_to_cart_text' ); 
function woocommerce_custom_single_add_to_cart_text() {
    return __( 'Add to Basket', 'woocommerce' ); 
}
// To change add to cart text on product archives page
add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_custom_product_add_to_cart_text' );  
function woocommerce_custom_product_add_to_cart_text() {
    return __( 'Add to Basket', 'woocommerce' );
}

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close