Firstly, it’s important to note that if you’re trying to change the button text to either “add to cart” or “add to basket” then this guide is not for you. These two strings are default and based on your store’s location. From what we can tell, where “cart” is used in a country, this string is used. Here in the UK for example, cart is American English. We would say a shopping cart is called a trolley. But that just sounds weird so WooCommerce have used basket for us Brits at least. Changing the add to cart button text on the product page is really quick and simple, and we’ll show you how to do exactly that in this guide.
/**
* Snippet Name: Change the Add To Cart button text on the WooCommerce single product template.
* Snippet Author: ecommercehints.com
*/
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 __( 'Custom Text Here', 'woocommerce' );
}