This looks like a case-sensitivity bug, which I am temporarily patching with a hotfix. WooCommerce’s translation targets only Sign Up Now in title case, not what was being printed in sentence case.
function custom_subscription_button_text( $button_text, $product ) {
if ( $product->is_type( array( 'subscription', 'variable-subscription' ) ) ) {
$button_text = __( 'Sign up now', 'woocommerce-subscriptions' );
}
return $button_text;
}
add_filter( 'woocommerce_product_single_add_to_cart_text', 'custom_subscription_button_text', 10, 2 );
add_filter( 'woocommerce_product_add_to_cart_text', 'custom_subscription_button_text', 10, 2 );
function custom_subscription_checkout_button_text( $button_text ) {
global $woocommerce;
// check if the cart contains a subscription product
foreach ( $woocommerce->cart->get_cart() as $cart_item_key => $cart_item ) {
$product = $cart_item['data'];
if ( WC_Subscriptions_Product::is_subscription( $product ) ) {
// change the button text for subscriptions
$button_text = __( 'Sign up now', 'woocommerce-subscriptions' );
break;
}
}
return $button_text;
}
add_filter( 'woocommerce_order_button_text', 'custom_subscription_checkout_button_text' );