Created
October 15, 2017 08:11
-
-
Save dr5hn/1725d42f3857529afa89f764e1a80515 to your computer and use it in GitHub Desktop.
WooCommerce - How to Change Add to Cart Button Text in Wordpress
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
<?php | |
//WooCommerce. How to change “Add to cart” button text -- By Darshan Gada | |
add_filter( 'add_to_cart_text', 'woo_custom_single_add_to_cart_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 __( 'ADD TO BASKET', 'woocommerce' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment