Title: Invoice emails have errors and code
Last modified: March 31, 2020

---

# Invoice emails have errors and code

 *  Resolved [kerkocivee](https://wordpress.org/support/users/kerkocivee/)
 * (@kerkocivee)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/invoice-emails-have-errors-and-code/)
 * I have setup Woocommerce and Stripe and started testing orders both LIVE and 
   TESTING mode. The emails I get for confirmation and successful payments and failures
   and even Thank you emails have weird errors. The link provided shows these:
    -
   Space after the first letter of the header regardless of German or English. -
   HTML code is showing when it shouldn’t. -Weird spacing breaks in words thats 
   suppose to be together. -Mixed English and German
 * How do I fix this? I did download a language .mo from the official translating
   page. installed the German .mo to the directory I was told to install it to from
   the instructions here [https://docs.woocommerce.com/document/woocommerce-localization/](https://docs.woocommerce.com/document/woocommerce-localization/)
 * Could this be the problem? I even tested TEXT only emails, but it still does 
   the weird spacing and page breaks. Keep in mind I have average knowledge of some
   editing of codes such as CSS, HTML, and i can find and delete the proper lines
   of PHP, but I’m no developer to search and fix the problem. If you tell me what
   to do in Barney Style then I can get fix it.
 * Thank you in advance,
    Ivee
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Finvoice-emails-have-errors-and-code%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Support [Aashik P – a11n](https://wordpress.org/support/users/aashik/)
 * (@aashik)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/invoice-emails-have-errors-and-code/#post-12609680)
 * Hello Ivee,
 * I understand you’re seeing HTML and improperly decoded emails from WooCommerce.
   For further investigation on what’s causing this, can you please get back to 
   us with:
 * 1. Confirmation on if the problem is specific to this particular user, or the
   emails are displaying the same to all the users.
    2. What happens when you try
   test orders for a user with an email address from a different domain? Perhaps
   test the order on a user with Gmail email address (to narrow down if this is 
   specific to the sending/receiving server)
 * Along with those details, could you please share a copy of your site’s System
   Status? You can find it via WooCommerce > Status.
    Select “Get system report”
   and then “Copy for support”.  Once you’ve done that, paste it here in your response.
 * Thank you for working with us on this.
 *  Thread Starter [kerkocivee](https://wordpress.org/support/users/kerkocivee/)
 * (@kerkocivee)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/invoice-emails-have-errors-and-code/#post-12610033)
 * Hello Aashik,
 * Thanks for the reply. I have provided the information requested underneath. I
   talked to some people and they said it’s a problem with the new WC version and
   WP PHP mailer and something with encoding. I was told there is no proper solution
   but a workaround. According to this link, the last post from danielfrude fixed
   it for some people. I will give that a try while waiting for a response. [https://wordpress.org/support/topic/woocommerce-emails-html-broken/page/3/](https://wordpress.org/support/topic/woocommerce-emails-html-broken/page/3/)
 * —————
 * 1. I tried using a different FROM email and it still displays the errors.
 * 2. I tried making and sending 5 different emails during the Testing mode of Stripe
   and WC. All does the same thing for HTML and Text. It’s the same problem for 
   every email.
    I got the same problem in Live mode with 2 customers (me and another
   family member) that were different emails also.
 * **Here is the System Status**
 *     ```
       ### WordPress Environment ###
   
       WordPress address (URL): https://shop.kerkoc.com
       Site address (URL): https://shop.kerkoc.com
       WC Version: 4.0.1
       REST API Version: ✔ 1.0.7
       WC Blocks Version: ✔ 2.5.14
       Action Scheduler Version: ✔ 3.1.4
       WC Admin Version: ✔ 1.0.3
       Log Directory Writable: ✔
       WP Version: 5.4
       WP Multisite: –
       WP Memory Limit: 512 MB
       WP Debug Mode: –
       WP Cron: ✔
       Language: en_US
       External object cache: –
   
       ### Server Environment ###
   
       Server Info: Apache
       PHP Version: 7.3.12
       PHP Post Max Size: 500 MB
       PHP Time Limit: 1200
       PHP Max Input Vars: 5000
       cURL Version: 7.62.0
       OpenSSL/1.0.2k
   
       SUHOSIN Installed: –
       MySQL Version: 5.6.46
       Max Upload Size: 500 MB
       Default Timezone is UTC: ✔
       fsockopen/cURL: ✔
       SoapClient: ✔
       DOMDocument: ✔
       GZip: ✔
       Multibyte String: ✔
       Remote Post: ✔
       Remote Get: ✔
   
       ### Database ###
   
       WC Database Version: 4.0.1
       WC Database Prefix: wp_
       Total Database Size: 8.19MB
       Database Data Size: 6.60MB
       Database Index Size: 1.59MB
       wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
       wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
       wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
       wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
       wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_actionscheduler_actions: Data: 0.02MB + Index: 0.11MB + Engine InnoDB
       wp_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_actionscheduler_logs: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
       wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_mailchimp_carts: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
       wp_mailchimp_jobs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
       wp_options: Data: 5.02MB + Index: 0.08MB + Engine InnoDB
       wp_postmeta: Data: 0.48MB + Index: 0.19MB + Engine InnoDB
       wp_posts: Data: 0.28MB + Index: 0.06MB + Engine InnoDB
       wp_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_term_relationships: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_usermeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
       wp_wc_admin_notes: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
       wp_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
       wp_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
       wp_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
       wp_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
       wp_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
       wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
       wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
   
       ### Post Type Counts ###
   
       attachment: 38
       custom_css: 1
       customize_changeset: 36
       elementor_library: 1
       nav_menu_item: 2
       page: 9
       post: 1
       product: 9
       product_variation: 24
       revision: 18
       shop_order: 8
       shop_order_refund: 2
   
       ### Security ###
   
       Secure connection (HTTPS): ✔
       Hide errors from visitors: ✔
   
       ### Active Plugins (11) ###
   
       Cookie Notice: by dFactory – 1.2.51
       Elementor: by Elementor.com – 2.9.7
       Facebook for WooCommerce: by Facebook – 1.10.2
       Jetpack by WordPress.com: by Automattic – 8.3
       Google Ads for WooCommerce: by Kliken – 1.0.4
       Mailchimp for WooCommerce: by Mailchimp – 2.3.5
       Orbit Fox Companion: by Themeisle – 2.9.5
       UpdraftPlus - Backup/Restore: by UpdraftPlus.Com
       DavidAnderson – 2.16.22.0
   
       WooCommerce Stripe Gateway: by WooCommerce – 4.3.2 – Not tested with the active version of WooCommerce
       WooCommerce Services: by Automattic – 1.22.5
       WooCommerce: by Automattic – 4.0.1
   
       ### Inactive Plugins (2) ###
   
       Akismet Anti-Spam: by Automattic – 4.1.4
       Hello Dolly: by Matt Mullenweg – 1.7.2
   
       ### Settings ###
   
       API Enabled: –
       Force SSL: –
       Currency: EUR (€)
       Currency Position: left
       Thousand Separator: .
       Decimal Separator: ,
       Number of Decimals: 2
       Taxonomies: Product Types: external (external)
       grouped (grouped)
       simple (simple)
       variable (variable)
   
       Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
       exclude-from-search (exclude-from-search)
       featured (featured)
       outofstock (outofstock)
       rated-1 (rated-1)
       rated-2 (rated-2)
       rated-3 (rated-3)
       rated-4 (rated-4)
       rated-5 (rated-5)
   
       Connected to WooCommerce.com: –
   
       ### WC Pages ###
   
       Shop base: #323 - /
       Cart: #324 - /einkaufswagen/
       Checkout: #325 - /kassen/
       My account: #326 - /mein-konto/
       Terms and conditions: ❌ Page not set
   
       ### Theme ###
   
       Name: Neve
       Version: 2.6.4
       Author URL: https://themeisle.com
       Child Theme: ❌ – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
       WooCommerce Support: ✔
   
       ### Templates ###
   
       Overrides: –
   
       ### Action Scheduler ###
   
       Complete: 36
       Oldest: 2020-03-27 10:00:34 +0000
       Newest: 2020-04-01 06:59:30 +0000
       ```
   
    -  This reply was modified 6 years, 2 months ago by [kerkocivee](https://wordpress.org/support/users/kerkocivee/).
 *  Thread Starter [kerkocivee](https://wordpress.org/support/users/kerkocivee/)
 * (@kerkocivee)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/invoice-emails-have-errors-and-code/#post-12610109)
 * I also found this under WC/STATUS/LOGS. Does this affect it?
 * **fatal-errors-2020-03-30-40d8cc7b12ec94f3149ae6f0350b56b6.log**
    2020-03-30T12:
   21:33+00:00 CRITICAL Out of memory (allocated 90177536) (tried to allocate 208896
   bytes) in /var/www/vhosts/1/140649/webspace/httpdocs/shop.kerkoc.com/wp-includes/
   functions.php on line 3820
 * 2020-03-30T12:29:48+00:00 CRITICAL Out of memory (allocated 90177536) (tried 
   to allocate 151552 bytes) in /var/www/vhosts/1/140649/webspace/httpdocs/shop.
   kerkoc.com/wp-includes/functions.php on line 3820
 *  Thread Starter [kerkocivee](https://wordpress.org/support/users/kerkocivee/)
 * (@kerkocivee)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/invoice-emails-have-errors-and-code/#post-12610170)
 * **\*UPDATE\***
 * > Thanks for the reply. I have provided the information requested underneath.
   > I talked to some people and they said it’s a problem with the new WC version
   > and WP PHP mailer and something with encoding. I was told there is no proper
   > solution but a workaround. According to this link, the last post from danielfrude
   > fixed it for some people. I will give that a try while waiting for a response.
   > [https://wordpress.org/support/topic/woocommerce-emails-html-broken/page/3/](https://wordpress.org/support/topic/woocommerce-emails-html-broken/page/3/)
 * The link that I posted earlier about editing the functions.php fixed it all. 
   I know this is a short term fix, but I’m more worried about when updates happen
   and if it will affect WC in the future. If there is a better and more stable 
   fix then I will try that too.
 *  Plugin Support [Aashik P – a11n](https://wordpress.org/support/users/aashik/)
 * (@aashik)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/invoice-emails-have-errors-and-code/#post-12615337)
 * Hi there!
 * I see there’s an active discussion regarding this topic in [this GitHub report](https://github.com/woocommerce/woocommerce/issues/26015).
 * Given that we have no extra information than what is in that thread, can we suggest
   to subscribe to this thread there to follow the interaction? That’ll allow you
   to be the first to find out when this is closed and solved.
 * You can subscribe by clicking this button on the GitHub repo (this will only 
   be visible if you have a GitHub account, [which can be done for free](https://github.com/join)):
 * ![](http://cld.wthms.co/2EmX9K+)
 * Image Link: [http://cld.wthms.co/2EmX9K](http://cld.wthms.co/2EmX9K)
 * —
 * Regarding the out of memory error that you reported, I’d recommend reaching out
   to your WebHost to see if they can increase the memory allotted to your site 
   to check if the Fatal error goes away. If not, it may require a complete conflict
   test to narrow down what’s happening here: [https://docs.woocommerce.com/document/how-to-test-for-conflicts/](https://docs.woocommerce.com/document/how-to-test-for-conflicts/)
 * Thank you for working with us on this.
 *  Thread Starter [kerkocivee](https://wordpress.org/support/users/kerkocivee/)
 * (@kerkocivee)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/invoice-emails-have-errors-and-code/#post-12617066)
 * Thank you Aashik! I will carefully follow the thread in case updates create errors
   to the workaround I used.
    -  This reply was modified 6 years, 2 months ago by [kerkocivee](https://wordpress.org/support/users/kerkocivee/).

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

The topic ‘Invoice emails have errors and code’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [emails](https://wordpress.org/support/topic-tag/emails/)
 * [errors](https://wordpress.org/support/topic-tag/errors/)

 * 6 replies
 * 2 participants
 * Last reply from: [kerkocivee](https://wordpress.org/support/users/kerkocivee/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/invoice-emails-have-errors-and-code/#post-12617066)
 * Status: resolved