Last active
March 11, 2019 19:52
-
-
Save emilushi/646fcb2b5c67c3b607cd0c2cd42ec624 to your computer and use it in GitHub Desktop.
Stop Weglot from translating emails sent using wp_mail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (class_exists(\WeglotWP\Actions\Email_Translate_Weglot::class) && ! in_array('weglot/weglot.php', apply_filters('active_plugins', get_option('active_plugins')), true)) { | |
remove_filter('wp_mail', [\WeglotWP\Actions\Email_Translate_Weglot::class, 'weglot_translate_emails']); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Im using Weglot for translating an WordPress website from English to German and on the website we are using Gravity Forms to handle form submissions. On one of the email sent from a visitor in German language we noticed that the email text was sent on a mix language between English and German.
So for anyone using Weglot and having same issue include the above into your theme's
function.php
to remove the email translation.