HOW TO CHANGE WOOCOMMERCE “ADD TO CART” BUTTON TEXT?
By default, the woocommerce product by button shows “Add to cart“, if you want to change the text with other any text. You can use this using woocommerce hook. You have to just add the following code in your theme function.php file
// To change add to cart text on product details 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 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' );
}