Skip to content

Instantly share code, notes, and snippets.

@frankschrijvers
Created September 19, 2016 08:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frankschrijvers/f12dacb521fd84784d152a89f5adeb48 to your computer and use it in GitHub Desktop.
Save frankschrijvers/f12dacb521fd84784d152a89f5adeb48 to your computer and use it in GitHub Desktop.
Change add to cart button text archive pages
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Change add to cart button text archive pages
add_filter( 'woocommerce_product_add_to_cart_text', 'wps_archive_custom_cart_button_text' );
function wps_archive_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