Skip to content

Instantly share code, notes, and snippets.

@wtmujeebu
Created June 14, 2018 06:05
Show Gist options
  • Save wtmujeebu/b8e5d22ba2da66621a6fc4174c7e5b8d to your computer and use it in GitHub Desktop.
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
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