WooCommerce: How to change the “Add to cart” button text to custom text

How To Change The “add To Cart” Button Text To Custom Text
Last Updated on

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.