Change “Add to Cart” text
-
I am trying to change add to cart text in woo. Now I have tried 3 different snippets to no avail. How is this done once and for all?
// Change add to cart text on single product page add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_add_to_cart_button_text_single' ); function woocommerce_add_to_cart_button_text_single() { return __( 'Collect', 'woocommerce' ); } // Change add to cart text on product archives page add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_add_to_cart_button_text_archives' ); function woocommerce_add_to_cart_button_text_archives() { return __( 'Collect', 'woocommerce' ); } // To change add to cart text on single product page add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_custom_single_add_to_cart_text' ); function woocommerce_custom_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', 'woocommerce_custom_product_add_to_cart_text' ); function woocommerce_custom_product_add_to_cart_text() { return __( 'Buy Now', 'woocommerce' ); } // Change "Add to Cart" > "Add to Bag" in Shop Page add_filter( 'woocommerce_product_add_to_cart_text', 'woocommerce_shop_page_add_to_cart_callback' ); function woocommerce_shop_page_add_to_cart_callback() { return __( 'Add to Bag', 'text-domain' ); } // Change "Add to Cart" > "Add to Bag" in Single Page add_filter( 'woocommerce_product_single_add_to_cart_text', 'woocommerce_single_page_add_to_cart_callback' ); function woocommerce_single_page_add_to_cart_callback() { return __( 'Add to Bag', 'text-domain' ); }
None of these have any effect.
Theme is TT4
Thx
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Change “Add to Cart” text’ is closed to new replies.