wp_mail_from filters doesn’t work
-
The tests to apply external filters to these values before using our own doesn’t work in the new version of the plugin. If you already have set other values for name and email via the filters wp_mail_from and wp_mail_from_name Mailgun the name WordPress and email wordpress@sitename is used despite the settings in Mailgun. And the native WordPress mail notification can’t use the filters already set in the custom function file when the Mailgun plugin is active now. Before these settings in the new Mailgun version you could set name and email via the filters and it worked both in Mailgun and other WordPress instances like comment notifications.
// Attempt to apply external filters to these values before using our own.
if (has_filter(‘wp_mail_from’)) {
$from_email = apply_filters(‘wp_mail_from’, $from_email);
}if (has_filter(‘wp_mail_from_name’)) {
$from_name = apply_filters(‘wp_mail_from_name’, $from_name);
}
- The topic ‘wp_mail_from filters doesn’t work’ is closed to new replies.