benecaster_before_account_subscription
Fires immediately before the subscription section card renders inside the benecaster_account shortcode. Output echoed from this hook appears above the subscription card, making it useful for prepending notices, expiry warnings, or promotional messages relevant to the subscriber’s current status.
This hook fires once per subscription card and only when a logged-in subscriber is viewing their own account page.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$show_id |
int |
— | ID of the show |
$user_id |
int |
— | WordPress user ID of the logged-in subscriber |
Examples
Show renewal reminder above card
add_action( 'benecaster_before_account_subscription', function ( int $show_id, int $user_id ): void {
if ( my_subscription_expires_soon( $user_id ) ) {
echo '<p class="renewal-notice">Your subscription renews in 3 days.</p>';
}
}, 10, 2 );
Notes
This hook wraps the entire subscription card. For a position inside it, use one of the finer-grained hooks such as benecaster_before_account_feed_url.
Affects
- Subscriber Account Page
Need this built rather than just documented? See our services →