Skip to main content
Login Join
Snippet · PHP

Change WooCommerce Product “Add to Cart” Button Text

Shared by Amit Dholiya · September 17, 2026 · @woocommerce_product_add_to_cart_text

7 views
1 upvote
Back to Snippets

Customize the Add to Cart button text across your WooCommerce store. This is useful if you want a more action-focused label such as “Buy Now”, “Shop Now”, or “Add to Bag.”

Steps

  1. Add the code below to your theme’s functions.php.
  2. Replace Buy Now with your preferred text.
  3. Save the file and refresh your WooCommerce pages.
/**
 * Change WooCommerce Add to Cart button text
 */
function custom_woocommerce_add_to_cart_text( $text ) {
    return 'Buy Now';
}

add_filter( 'woocommerce_product_add_to_cart_text', 'custom_woocommerce_add_to_cart_text' );
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments