Skip to content

Instantly share code, notes, and snippets.

@marcosfreitas
Forked from claudiosanches/functions.php
Created August 20, 2013 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcosfreitas/6284842 to your computer and use it in GitHub Desktop.
Save marcosfreitas/6284842 to your computer and use it in GitHub Desktop.
<?php
/**
* Add to card text
*
* @param string $text Default text.
*
* @return string New text.
*/
function cs_add_to_cart_text( $text ) {
return __( 'Add to cart', 'woocommerce' );
}
add_filter( 'variable_add_to_cart_text', 'cs_add_to_cart_text' );
add_filter( 'grouped_add_to_cart_text', 'cs_add_to_cart_text' );
add_filter( 'external_add_to_cart_text', 'cs_add_to_cart_text' );
add_filter( 'add_to_cart_text', 'cs_add_to_cart_text' );
add_filter( 'not_purchasable_text', 'cs_add_to_cart_text' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment