woocommerce add to cart button name change with file location

Solutions on MaxInterview for woocommerce add to cart button name change with file location by the best coders in the world

showing results for - "woocommerce add to cart button name change with file location"
Uriel
16 Mar 2016
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}
Moussa
18 Jun 2017
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}
similar questions