Skip to content

Instantly share code, notes, and snippets.

@frankschrijvers
Last active July 17, 2021 04:07
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Change add to cart button text
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Change add to cart button text single product page
add_filter( 'woocommerce_product_single_add_to_cart_text', 'wps_custom_cart_button_text' );
function wps_custom_cart_button_text() {
return __( 'Buy Product', 'your_theme_text_domain' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment