Skip to main content

benecaster_email_body_text

Filter Free Since v1.0.0

Filters the plain text version of any Benecaster email. Auto-generated from HTML if not overridden. Sent as the text/plain part of the multipart email. Type-specific variant: benecaster_email_body_text_{type} — 3 params, $email_type omitted.

Parameters

Name Type Default Description
$body_text string Email plain text body
$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_body_text', function( $body_text, $email_type, $user_id, $show_id ) {
    // Append an unsubscribe reminder to the plain-text version.
    return $body_text . "\n\nManage your subscription preferences via the link in the footer.";
}, 10, 4 );