benecaster_subscription_renewed
Fires when a built-in membership subscription renews or its billing state changes without a tier change. Scenarios that trigger it include: a billing period rollover, a billing interval switch (monthly to annual or vice versa), a status transition such as active → past_due on payment failure or past_due → active on a retry success, and a change to the cancel_at_period_end flag.
This action is not fired on tier changes — those fire benecaster_subscription_tier_changed instead. It is also not fired by third-party membership plugin bridges (MemberPress, WooCommerce Subscriptions, etc.). The subscriber’s feed token is never replaced or regenerated on renewal — the feed URL stays the same across billing cycles.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$user_id |
int |
— | Subscriber user ID. |
$show_id |
int |
— | Show post ID. |
Examples
Log every billing period advance
add_action( 'benecaster_subscription_renewed', function ( int $user_id, int $show_id ): void {
my_billing_log_write( $user_id, $show_id, current_time( 'mysql' ) );
}, 10, 2 );
Send custom renewal receipt email
add_action( 'benecaster_subscription_renewed', function ( int $user_id, int $show_id ): void {
$user = get_userdata( $user_id );
if ( ! $user ) {
return;
}
wp_mail(
$user->user_email,
'Your subscription has renewed',
sprintf( "Hi %s,\n\nYour podcast subscription just renewed. Thanks for your support.", $user->display_name )
);
}, 10, 2 );
Notes
Never call token generation logic inside a callback on this hook. The subscriber's feed URL does not change on renewal — generating or reactivating a token for an already-active subscriber will create a duplicate entry. This action fires only for built-in membership subscribers.