benecaster_email_from_name
Filters the sender name for any Benecaster email.
A type-specific variant is available — append the email type to the hook name (e.g. benecaster_email_from_name_welcome) to target a single type; the $email_type parameter is omitted on the type-specific variant.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$from_name |
string |
— | Sender name |
$email_type |
string |
— | Email type string |
$user_id |
int|null |
— | WordPress user ID; null for admin-only emails |
$show_id |
int|null |
— | ID of the show; null when not show-specific |
Returns:
string
Example
add_filter( 'benecaster_email_from_name', function( $from_name, $email_type, $user_id, $show_id ) {
// Use the show name as the sender name for episode notifications.
if ( 'episode_notification' === $email_type && $show_id ) {
return get_the_title( $show_id );
}
return $from_name;
}, 10, 4 );