Join Digital Nomads and Remote Workers to Ask Questions, Share Experiences, Find Remote Jobs and Seek Recommendations.

WooCommerce: How to custom “Add to cart” button text?

If you looking for a way to change the “add to cart” button text in Woo-commerce, you came to the right place. To change the text, you can use the code snippet below to change the text to anything you like. For example “BUY NOW”, “DONATE NOW”, “ADD PRODUCT”, “BUY” or etc…

Instructions:

1. First of all, add the code to function.php file with FTP. The folder path will be like ‘wp-content\themes\theme#####\includes‘. .

add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_single_add_to_cart_text' );  
function woo_custom_single_add_to_cart_text() {
	return __( 'My Button Text', 'woocommerce' );
}

2. Save the changes and check your website. You will see the button text is changed, if you don’t see it don’t forget to clear the cache.

We Work From Anywhere

Find Remote Jobs, Ask Questions, Connect With Digital Nomads, and Live Your Best Location-Independent Life.