Skip to content

Snippet: How to Change WooCommerce “Select Options” Text

The following code can be used to alter the default WooCommerce "Select Options" text in the add to cart button displayed for the product entries.

add_filter( 'woocommerce_product_add_to_cart_text', function( $text ) {
	global $product;
	if ( $product->is_type( 'variable' ) ) {
		$text = $product->is_purchasable() ? __( 'Custom options text', 'woocommerce' ) : __( 'Read more', 'woocommerce' );
	return $text;
}, 10 );
All PHP snippets should be added via child theme's functions.php file or via a plugin. We recommend Code Snippets (100% Free) or WPCode (sponsored)
Back To Top