Skip to content

boolean_smtp_plain_text_body

Filters the automatically generated plain-text alternative body.

filter Tier A Since 1.0.0

Return a modified string to use as the message's plain-text part.

Signature

add_filter( 'boolean_smtp_plain_text_body', $callback, 10, 2 );

Parameters

ParameterTypeDescription
$plainTextstringPlain-text body generated from the HTML body.
$htmlBodystringOriginal HTML body the plain-text version was generated from.

Returns string — The filtered plain text.

Fires in

Example

boolean_smtp_plain_text_body.php
add_filter( 'boolean_smtp_plain_text_body', function ( string $plainText, string $htmlBody ) {
return $plainText;
}, 10, 2 );

Next steps