Email Merge Tags Reference
Merge tags are {{double-brace}} placeholders in email templates that Benecaster replaces with real values at send time — one resolution per recipient.
Global Tags
Available in every Benecaster email regardless of type.
| Tag | Value |
|---|---|
{{site_name}} |
WordPress site name from Settings → General |
{{site_url}} |
WordPress site URL |
{{current_year}} |
Current four-digit year |
{{subscriber_name}} |
Subscriber’s display name; empty string for admin-only emails |
{{subscriber_email}} |
Subscriber’s email address; empty string for admin-only emails |
{{show_title}} |
Display name of the show |
{{show_url}} |
Show’s public URL |
{{unsubscribe_url}} |
HMAC-signed opt-out URL for this subscriber and show; empty string for admin-only emails |
Welcome Email Tags
If you’re using the Email Editor, these tags are available in the merge tag autocomplete — no manual typing required. Available in addition to all global tags when $email_type is welcome.
| Tag | Value |
|---|---|
{{feed_url}} |
Subscriber’s new private RSS feed URL (plaintext token URL, filtered via benecaster_token_url) |
{{tier_name}} |
Subscriber’s tier display name from TierMapRepository; empty string if no tier map row exists |
{{apple_podcasts_url}} |
Deep link to open the feed in Apple Podcasts |
{{overcast_url}} |
Deep link to open the feed in Overcast |
{{pocket_casts_url}} |
Deep link to open the feed in Pocket Casts |
{{castro_url}} |
Deep link to open the feed in Castro |
Token Reset Email Tags
Available in addition to all global tags when $email_type is token_reset.
| Tag | Value |
|---|---|
{{feed_url}} |
New private RSS feed URL after reset |
{{apple_podcasts_url}} |
Deep link for the new feed URL |
{{overcast_url}} |
Deep link for the new feed URL |
{{pocket_casts_url}} |
Deep link for the new feed URL |
{{castro_url}} |
Deep link for the new feed URL |
{{custom_message}} |
Optional admin-supplied note; empty string when no message was provided |
Tier Change Email Tags
Available in addition to all global tags when $email_type is tier_change.
| Tag | Value |
|---|---|
{{old_tier_name}} |
Display name of the subscriber’s previous tier; empty string if not found in tier map |
{{new_tier_name}} |
Display name of the new tier; empty string if not found in tier map |
Donation Thank-You Email Tags
Available when $email_type is donation_thank_you. Only sent when the “Collect donor email” setting is enabled for the show.
| Tag | Value |
|---|---|
{{donor_name}} |
Donor’s name as submitted; empty string if not collected |
{{amount_formatted}} |
Locale-formatted amount with currency symbol (e.g. $10.00) |
{{amount}} |
Raw amount in major units (e.g. 10.00) |
{{currency}} |
ISO 4217 currency code, uppercase (e.g. USD) |
{{show_title}} |
Display name of the show |
{{donation_date}} |
Date of donation in site date format |
{{donor_message}} |
Message left by donor; empty string if not collected or not configured |
Episode Notification Email Tags
Available when $email_type is episode_notification. Requires the Email Editor add-on.
| Tag | Value |
|---|---|
{{episode_title}} |
Episode post title |
{{episode_url}} |
Episode page URL |
{{episode_number}} |
Episode number; empty string if not set |
{{season_number}} |
Season number; empty string if not set |
{{season_name}} |
Season display name (Podcasting 2.0); empty string if not set |
{{episode_type}} |
full, trailer, or bonus |
{{episode_duration}} |
Human-readable duration |
{{episode_artwork_url}} |
Episode artwork URL |
{{listen_url}} |
URL to listen to the episode |
{{tier_name}} |
Subscriber’s tier display name |
{{availability_date}} |
Date this tier can access the episode |
{{episode_magic_link}} |
Per-subscriber tokenized episode URL for one-click access (Email Editor only) |
{{player_image}} |
HTML player card with artwork + play button, linked to magic link (Email Editor only) |
Registering Custom Tags
Add your own merge tags via benecaster_email_merge_tags (global) or benecaster_email_merge_tags_{type} (type-specific):
// Global — available in every email type
add_filter( 'benecaster_email_merge_tags', function( array $tags, string $type, ?int $user_id, ?int $show_id ): array {
$tags['podcast_network'] = get_option( 'podcast_network_name', '' );
return $tags;
}, 10, 4 );
// Type-specific — available in welcome emails only (3 params, no $type)
add_filter( 'benecaster_email_merge_tags_welcome', function( array $tags, ?int $user_id, ?int $show_id ): array {
$tags['tier_benefits_url'] = home_url( '/member-benefits/' );
return $tags;
}, 10, 3 );
Tags are resolved at enqueue time — your filter receives an already-populated $tags array with all built-in values for that send. Add new keys or overwrite existing ones. Return the modified array.
Using Tags in Templates
In PHP templates, use $tags['tag_name'] directly (the resolved variable, not the brace syntax). In template content strings rendered by the email renderer, use {{tag_name}} and the renderer substitutes the value before output.
See Customizing Email Templates for template override details.