Add to Cart Button Text Changer

Change the Add to cart button text on the shop page, the product page, or both, for one product type, category or stock status.

Describe the result you need. AI will set up the tool and ask for any missing details.

Configure with AI

Enter to submit · Shift + Enter for a new line

Sent to AI. Leave out passwords and private customer data.

Your details

Your snippet

woocommerce-add-to-cart-text.php
<?php
/**
 * Change the Add to cart button text.
 */

add_filter( 'woocommerce_product_add_to_cart_text', 'ea_add_to_cart_text', 10, 2 );
function ea_add_to_cart_text( $text, $product ) {
	return 'Notify me';
}
add_filter( 'woocommerce_product_single_add_to_cart_text', 'ea_single_add_to_cart_text', 10, 2 );
function ea_single_add_to_cart_text( $text, $product ) {
	return 'Notify me';
}

woocommerce_product_add_to_cart_text controls the shop/category loop button; woocommerce_product_single_add_to_cart_text controls the product page button. Both templates already check is_purchasable() before showing a button at all.

Two filters, one for each page

WooCommerce reads the button text from WC_Product::add_to_cart_text(), which applies woocommerce_product_add_to_cart_text (used on the shop and category archive loops) and from single_add_to_cart_text(), which applies woocommerce_product_single_add_to_cart_text (used on the product page). Filtering both keeps the wording consistent wherever a shopper sees the button.

The condition you pick (product type, category, or stock status) is just an if check inside the filter, using $product->is_type(), has_term() or $product->get_stock_status(), so the rest of your catalogue keeps the default "Add to cart" text.

Adding it to WooCommerce

Paste the snippet into a site-specific plugin or your child theme's functions.php, then check the shop page and a matching product page to confirm the new text shows only where you meant it to.

For an out-of-stock condition, also check Settings → Products → Inventory: if “Hide out of stock items from the catalog” is on, those products won't show on the shop page at all, so you'll only see the change on the product page.

Questions people ask

Why does the button still say "Read more" on some products?

WooCommerce shows "Read more" on the shop loop for any product that isn't purchasable right now (no price set, or out of stock without backorders). Fix the underlying reason, or use the stock status condition here to give that state its own button text, like "Notify me".

Can I change the text only for variable products before a variation is chosen?

Yes, pick “Variable” as the product type. That changes the loop button (which links to the product page) and the initial single-product button before a variation is selected. Once a variation is chosen, the button follows the variation's own purchasability, not this filter.

Does this work for external/affiliate products?

Yes, but external products already print their own "Buy product" style text via a separate default; picking “External/Affiliate” as the type targets that button specifically.

Will this change the mini-cart or block-based Cart page button text?

No, those use different button text ("View cart", "Proceed to checkout"). Use the WooCommerce Text String Changer for that wording.

Want this builtinto your store?

I'm Emmanuel, a Shopify and WooCommerce developer. If this tool pointed at something you'd rather have fixed for you (a faster store, cleaner product data, a migration, a custom feature), send me a note.

Emmanuel Asika

Emmanuel Asika

Shopify & WooCommerce developer, Dublin

I build and fix online stores: new builds, migrations, speed, SEO and the custom bits apps can't do.

hello@emmanuelasika.com