Skip to content

Instantly share code, notes, and snippets.

@jameskoster
Created November 28, 2013 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jameskoster/7691051 to your computer and use it in GitHub Desktop.
Save jameskoster/7691051 to your computer and use it in GitHub Desktop.
WooCommerce change single product add to cart text
add_filter( 'add_to_cart_text', 'woo_custom_cart_button_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 __( 'My Button Text', 'woocommerce' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment