Created
June 14, 2018 06:05
-
-
Save wtmujeebu/b8e5d22ba2da66621a6fc4174c7e5b8d to your computer and use it in GitHub Desktop.
Change Add to cart button text only on shop page - WebToffee WooCommerce Subscription
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
add_filter('woocommerce_product_add_to_cart_text', 'webtoffee_archive_custom_addtocart_button_text', 10, 2); | |
function webtoffee_archive_custom_addtocart_button_text($var, $instance) | |
{ | |
if(is_shop()){ | |
$var = __('Read More', 'woocommerce'); | |
} | |
return $var; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment