Created
May 2, 2014 09:31
-
-
Save michaelwilhelmsen/51ed121746b375cbcf67 to your computer and use it in GitHub Desktop.
Customise 'add to cart' text on single product pages. Replace 'my button text' with whatever you want it to say.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'add_to_cart_text', 'woo_custom_cart_button_text' ); // < 2.1 | |
| add_filter( 'woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text' ); // 2.1 + | |
| function woo_custom_cart_button_text() { | |
| return __( 'My Button Text', 'woocommerce' ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment