Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
If you work in WooCommerce and sometimes need to change the default button text “Add To cart” in WooCommerce to be more realistic to your web design or your purpose like “Donate Now” or “Purchase Now”.
This code snippet will let you change the text to what you need by using WooCommerce Filter with simple steps
Steps to change “add to cart” button text:
// Changing add to cart text on single product page add_filter( 'woocommerce_product_single_add_to_cart_text', 'zytheme_woocommerce_custom_single_add_to_cart_text' ); function zytheme_woocommerce_custom_single_add_to_cart_text() { return __( 'Purchase Now', 'woocommerce' ); } // Changing add to cart text on product archives page add_filter( 'woocommerce_product_add_to_cart_text', 'zytheme_woocommerce_custom_product_add_to_cart_text' ); function zytheme_woocommerce_custom_product_add_to_cart_text() { return __( 'Purchase Now', 'woocommerce' ); }