Created
February 26, 2024 23:40
-
-
Save Njengah/cc392fd357ade81a94b620431b91ca3f to your computer and use it in GitHub Desktop.
Change Add to Cart Text WooCommerce
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
<?php | |
// To change add to cart text on single product page | |
add_filter( 'woocommerce_product_single_add_to_cart_text', 'storemizer_single_add_to_cart_text' ); | |
function storemizer_single_add_to_cart_text() { | |
return __( 'Buy Now', 'woocommerce' ); | |
} | |
// To change add to cart text on product archives(Collection) page | |
add_filter( 'woocommerce_product_add_to_cart_text', 'storemizer_product_add_to_cart_text' ); | |
function storemizer_product_add_to_cart_text() { | |
return __( 'Buy Now', 'woocommerce' ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment