Last active
December 15, 2015 11:49
-
-
Save fender841/5255958 to your computer and use it in GitHub Desktop.
Changing add_to_cart button text on single product pages and category view pages.
This file contains 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
//For changing add-to-cart button text on single product pages. | |
add_filter('single_add_to_cart_text', 'single_cart_button_text', ); | |
function single_cart_button_text() { | |
return __('Add to order', 'woocommerce'); | |
} | |
//For changing add-to-cart button text on category view pages | |
add_filter('add_to_cart_text', 'category_cart_button_text', ); | |
function category_cart_button_text() { | |
return __('custom text', 'woocommerce'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment