• Resolved cheesygoat

    (@cheesygoat)


    Hello. Is it possible to have all email confirmation in the default language instead of the one client chose in the website. Many thanks

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Daniel

    (@danieldandu)

    Hello @cheesygoat,

    To globally disable email translation and ensure all emails are sent in your site’s default language, you can use the following custom code.
    This involves creating and installing a simple custom plugin that will ensure the regular strings from emails are not translated by TranslatePress. Please note that gettexts from emails will still be translated. Here’s the code:

    add_action( 'trp_before_running_hooks', 'trpc_remove_hooks_to_stop_email_translation', 10, 1);
    function trpc_remove_hooks_to_stop_email_translation( $trp_loader ){
    $trp_loader->remove_hook( 'wp_mail', 'wp_mail_filter' );
    }
    • Install this plugin via FTP (copy it inside wp-content/plugins) or create a zip archive with it and install it via the WordPress plugin upload functionality

    It is recommended to test this plugin first on a staging site.

    Thread Starter cheesygoat

    (@cheesygoat)

    Dear support,

    Can we add this line of code to our functions.php instead of create an empty plugin as you provided
    add_action( ‘trp_before_running_hooks’, ‘trpc_remove_hooks_to_stop_email_translation’, 10, 1);function trpc_remove_hooks_to_stop_email_translation( $trp_loader ){ $trp_loader->remove_hook( ‘wp_mail’, ‘wp_mail_filter’ );}

    Plugin Support Daniel

    (@danieldandu)

    Hello @cheesygoat,

    Yes, you can add the provided code directly to your functions.php file instead of creating a separate plugin.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Email Order confirmation’ is closed to new replies.