Skip to content

Instantly share code, notes, and snippets.

@SiR-DanieL
Created October 30, 2023 10:31
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 SiR-DanieL/0820c7edc89e819a96c17396501f8d29 to your computer and use it in GitHub Desktop.
Save SiR-DanieL/0820c7edc89e819a96c17396501f8d29 to your computer and use it in GitHub Desktop.
Change the “Add to Cart” text on the single product page
<?php
// Change add to cart text on single product page
add_filter( 'woocommerce_product_single_add_to_cart_text', 'change_add_to_cart_text' );
function change_add_to_cart_text() {
return 'Add to Bag';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment