This should be off topic since it’s about WooCommerce, but it just happens that I already had done this so here it goes
One thing to consider is that each product type has it’s button. So in your case, SELECT OPTIONS
refers to a variable
product type
of course, you don’t need to switch through every possible scenario, but since my code had it, I’m keeping it so you see other possible use of this function
add_filter( 'woocommerce_product_single_add_to_cart_text', 'wpse_woo_custom_cart_button_text' );
add_filter( 'woocommerce_product_add_to_cart_text', 'wpse_woo_custom_cart_button_text' );
function wpse_woo_custom_cart_button_text() {
global $product;
$product_type = $product->get_type();
// To modify on a single product page
if( $product_type == 'variable-subscription' || $product_type == 'variable' ){
if( is_single() )
return __( 'Buy Now', 'my-textdomain' );
else
return __( 'Choose options', 'my-textdomain' );
}
// To modify on the shop page
else{
switch ( $product_type ) {
case 'external':
return __( 'Buy Now', 'my-textdomain' );
break;
case 'grouped':
return __( 'View products', 'my-textdomain' );
break;
case 'simple':
return __( 'Buy Now', 'my-textdomain' );
break;
// here's your use case
case 'variable':
return __( 'Select Value', 'my-textdomain' );
break;
// Not a default product type
case 'booking':
return __( 'Book Now', 'my-textdomain' );
break;
default:
return __( 'Learn more', 'my-textdomain' );
}
}
}
you can put this into your functions.php
file