Created
October 8, 2014 14:30
-
-
Save growdev/164f23e0f6294cb17956 to your computer and use it in GitHub Desktop.
Change WooCommerce Add To Cart test on product page
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
<?php | |
// The Add to cart form is in this template file | |
// /woocommerce/templates/single-product/add-to-cart/simple.php | |
// and calls WC_Product::single_add_to_cart_text() to get the text for the button. | |
// This is the filter that is set around that text. | |
add_filter('woocommerce_product_single_add_to_cart_text', 'growdev_change_addtocart'); | |
function growdev_change_addtocart( $arg ) { | |
// Change the argument to the new text for the button | |
$arg = "BUY NOW"; | |
return $arg; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment