Last active
February 12, 2022 04:19
-
-
Save kwcjr/5ec8104799b71892f276b81c2e619980 to your computer and use it in GitHub Desktop.
Change add to cart text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To change add to cart text on single product page. | |
add_filter( 'woocommerce_product_single_add_to_cart_text', 'custom_add_to_cart_callback' ); | |
// To change add to cart text on product archives(Collection) page. | |
add_filter( 'woocommerce_product_add_to_cart_text', 'custom_add_to_cart_callback' ); | |
// Custom add_to_cart text to change to. | |
function custom_add_to_cart_callback() { | |
return __( 'Submit Payment', 'text-domain' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment