WooCommerce uses “Add to cart” as the default button text for all product types on both the shop archive and individual product pages. This generic label doesn’t differentiate between a simple purchasable product, a variable product that requires option selection, or an external affiliate product that links elsewhere. Customising the button text per product type makes the shopping experience clearer, sets correct expectations, and can meaningfully improve conversion rates, a button that says “Choose Options” on a variable product is more honest and less confusing than one that says “Add to cart” before any options have been selected.
The Code
Add this to your functions.php or a site-specific plugin. WooCommerce provides two separate filters: woocommerce_product_add_to_cart_text for the loop (shop archive, category pages, related products), and woocommerce_product_single_add_to_cart_text for the single product page. Both receive the current text and the product object as arguments.
Product Type Checks
$product->is_type() accepts a product type string and returns true when the product matches. WooCommerce’s built-in types are simple, variable, grouped, external, and subscription (if WooCommerce Subscriptions is active). The method also accepts an array of types for checking multiple at once.
The stock check $product->is_in_stock() lets you customise the button label for out-of-stock products as well. Changing the label to something like “Out of Stock” or “Currently Unavailable” rather than leaving the default, which some themes hide entirely and others leave unchanged, gives visitors clear feedback without requiring a separate stock badge element.
Differentiated Text Strategy
The labels used in the snippet are starting points. A few principles worth applying when choosing your own:
On the archive loop, where space is tight and the button drives users to either add directly or visit the product page, action-oriented and short labels perform best. “Buy Now” for in-stock simples, “View Options” or “Choose Options” for variables.
On the single product page, where the user is already engaged and examining the product, slightly longer and more descriptive labels are appropriate. “Add to Cart” remains fine for simples. For external products, the button label should reflect what clicking it does, “Buy at [Retailer]” or “Get It on Amazon” are more transparent than a generic label.
Grouped Products
Grouped products don’t have a single add-to-cart button in the same way, they display a table of child products each with their own quantity and add-to-cart inputs. The filter applies to the overall grouped product button if your theme renders one, but the individual child product buttons within the group use the simple product filter. Test grouped product behaviour separately if your store uses them.
// Archive/loop add-to-cart text
add_filter( 'woocommerce_product_add_to_cart_text', function( $text, $product ) {
if ( $product->is_type( 'simple' ) && $product->is_in_stock() ) {
return 'Buy Now';
}
if ( $product->is_type( 'variable' ) ) {
return 'Choose Options';
}
if ( $product->is_type( 'external' ) ) {
return 'Get It Here';
}
if ( ! $product->is_in_stock() ) {
return 'Out of Stock';
}
return $text;
}, 10, 2 );
// Single product page add-to-cart text
add_filter( 'woocommerce_product_single_add_to_cart_text', function( $text, $product ) {
if ( $product->is_type( 'simple' ) && $product->is_in_stock() ) {
return 'Add to Cart';
}
if ( ! $product->is_in_stock() ) {
return 'Currently Unavailable';
}
return $text;
}, 10, 2 );
