Search code examples
htmlunicodewoocommerce

TM symbol image instead of unicode special character in woocommerce emails


I run a webshop where we sell products that are trademarked and protected. This means that all product names contain the ™ symbol. Woocommerce emails takes the product title for the order confirmation emails, but has problems with visualising the ™ symbol. It becomes an image. I have exchanged all ™ symbols in the product titles with the appropriate html entity ™, but it's not helping.

enter image description here

What can I do to improve this?


Solution

  • The woocommerce emails, or wp_mail, use an emoji for these symbols. So if you want to disable this, you can remove emoji from wp_mail and it will use the html unicode ™ symbol instead.

    Add the following line in the bottom of your functions.php:

    function disable_emojis() {
        remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
    }
    add_action( 'init', 'disable_emojis' );
    

    Tested it, and it works.