Skip to main content

Email Filters

Filters for Email. Every other area is listed on the Filter Hooks Reference. Each name links to its own page, with its parameters, notes and an example.

Filter any part of an outgoing Benecaster email — whether it sends, its subject and body, its headers, its merge tags, its header/footer branding, a stored design that replaces its template, and which types are exempt from broadcast opt-out suppression.

Filter Description
benecaster_email_should_send Controls whether a specific email is dispatched; type-specific variant: benecaster_email_should_send_{type}
benecaster_email_subject Filters the subject line for any Benecaster email, before its merge tags are filled in; type-specific variant: benecaster_email_subject_{type}
benecaster_email_body_html Filters the HTML body for any Benecaster email; type-specific variant: benecaster_email_body_html_{type}
benecaster_email_body_text Filters the plain text body for any Benecaster email; type-specific variant: benecaster_email_body_text_{type}
benecaster_email_headers Filters the headers array passed to wp_mail(); type-specific variant: benecaster_email_headers_{type}
benecaster_email_merge_tags The primary hook for registering custom merge tags; type-specific variant: benecaster_email_merge_tags_{type}
benecaster_email_merge_tag_catalog Describes every merge tag (label, description, email types, sample value, kind) so an email editor can list it; the kind decides how a stored body escapes it
benecaster_email_template_body Supplies an email’s body from stored HTML instead of its template file; still wrapped, and beats a theme override
benecaster_email_template_wrapper Supplies an email’s wrapper from stored HTML instead of the built-in one; must contain {{body}}, and beats a theme override
benecaster_email_wrapper_args Filters the header/footer context: logo URL, show name, accent color, footer text, business address, preview text
benecaster_email_template_locale Filters the locale used for email template file resolution before template loading
benecaster_email_unsubscribe_allowed Controls whether an unsubscribe request should be processed; only use for rate limiting, never to block legitimate opt-outs
benecaster_transactional_email_types Filters the email types that bypass broadcast opt-out suppression (welcome, token_reset, etc.)
benecaster_managed_email_types Filters the array of registered email types; types returned here appear as editable templates in the Email Editor

See Also

Need this built rather than just documented? See our services →