rcp_stripe_checkout_subscription_data

Filters the subscription data passed through to the  Stripe Checkout arguments. The filtered value is an array of subscriptions, with each value being another array containing the subscription level's name, description, and a panel label.

The filter in context:

$subscriptions = array();
foreach ( rcp_get_subscription_levels( 'active' ) as $subscription ) {
	$subscriptions[ $subscription->id ] = array(
		'description' => $subscription->description,
		'name'        => $subscription->name,
		'panelLabel'  => $this->is_trial() ? __( 'Start Trial', 'rcp' ) : __( 'Register', 'rcp' ),
	);
}

$subscriptions = apply_filters( 'rcp_stripe_checkout_subscription_data', $subscriptions );

Example for modifying the "panelLabel" for each subscription level:

function ag_rcp_stripe_checkout_subscription_data( $subscriptions ) {
	foreach ( $subscriptions as $sub_id => $sub_data ) {
		$subscriptions[ $sub_id ]['panelLabel'] = __( 'Register or Renew', 'rcp' );
	}

	return $subscriptions;
}
add_filter( 'rcp_stripe_checkout_subscription_data', 'ag_rcp_stripe_checkout_subscription_data' );