// 多规格商品选择规格改为立即购买
add_filter( 'woocommerce_product_add_to_cart_text', 'custom_variable_add_to_cart_text' );
function custom_variable_add_to_cart_text( $add_to_cart_text ) {
global $product;
if( $product->is_type( 'variable' ) ) {
$add_to_cart_text = __( 'Shop Now', 'woocommerce' );
}
return $add_to_cart_text;
}