1// To change add to cart text on single product page
2add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_single_add_to_cart_text' );
3function woocommerce_custom_single_add_to_cart_text() {
4 return __( 'Buy Now', 'woocommerce' );
5}
6
7// To change add to cart text on product archives(Collection) page
8add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_custom_product_add_to_cart_text' );
9function woocommerce_custom_product_add_to_cart_text() {
10 return __( 'Buy Now', 'woocommerce' );
11}