How to change “Add to cart” button text in WooCommerce?

In this tutorial, I will show you how you can change the “add to cart” button text on WooCommerce archive and single product pages.

See Also : Remove “Add to Cart” button on product listing pages in WooCommerce

To do this paste the following WordPress code snippet in your functions.php file.

//Change Woocommerce add to cart button text
add_filter( 'add_to_cart_text', 'woo_custom_cart_button_text' );                        
add_filter( 'woocommerce_product_add_to_cart_text', 'woo_custom_cart_button_text' );
add_filter('woocommerce_product_single_add_to_cart_text', 'woo_custom_cart_button_text');
 
function woo_custom_cart_button_text() {
 
        return __( 'Buy Now', 'woocommerce' );
 
}

Note: Change  ‘Buy Now’ with your own custom text.

1 Comments

Leave a Comment.