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