Product Page

WooCommerce Change Add To Cart Button Text On Product Page

Pre-Requisites

There are no pre-requisites in order for you to be able to implement this solution.

How To Implement This Solution?

Simply copy the pre-coded solution to your active theme’s functions.php or preferably the Code Snippets Plugin.

About This Solution

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

100 WooCommerce Conversion Rate Optimisation Tips

This field is for validation purposes and should be left unchanged.

Let’s collaborate!

Need to outsource WordPress development?

Join forces with UnlimitedWP for an outsourced white label web development service you can truly rely on.

First Timer Here?

Sign up to receive 20% off on your first month with us.

26027
WELCOME OFFER