Skip to content

Instantly share code, notes, and snippets.

@simonlk
Created August 17, 2013 00:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonlk/6254626 to your computer and use it in GitHub Desktop.
Save simonlk/6254626 to your computer and use it in GitHub Desktop.
Change add to cart button text on single product page. For some reason it doesn't work if the text "Add to Cart" is used so double spacing makes it work. WTF.
/* Add to cart button text */
add_filter('single_add_to_cart_text', 'woo_custom_cart_button_text');
function woo_custom_cart_button_text() {
return __('Add to Cart', 'woocommerce');
}
@dzulhelmi
Copy link

How to change the text+to other URL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment