Snippets: 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 a child theme's functions.php file.