• Hi there,
    I had a feeling that this was working in the version before – but maybe i did not look closer.
    Since i dont know where and how to change it:

    The confirmation Email (when finished order/purchase)does not add breaks into lines where the customers details are displayer so it makes it hard to read when Name, Street Adresse, Postal Code and City come without any break.

    It reads somehow like this:
    billing address:
    JonDoeBackstreetNo2333222CityofAngels

    Any chance to change that?
    thanks

    https://www.ads-software.com/plugins/woocommerce/

Viewing 5 replies - 1 through 5 (of 5 total)
  • On my setup, the email is properly formatted.

    Check that WP, WC and your theme are up-to-date.

    Use a text editor to have a look at line 7 of:
    wp-content/plugins/woocommerce/templates/emails/admin-new-order.php.
    My version of that file is 2.0.0.

    Some themes may override that file with one at
    wp-content/your-theme/woocommerce/emails/admin-new-order.php
    if so, rename that one for now. Hopefully it will be updated by your theme developer in due course.

    Thread Starter aovivo

    (@aovivo)

    Hey lorro,
    thanks for looking into this.
    i checked the line as advised and the version is 2.0.0.
    However the theme (enfold) does not come with an own woocommerce email template – not that i know of and i didnt see any folders similar to those of original woocommerce…
    in addition to that i am using a plug-in that monitors the checkout process in order to adapt to legal issues in the german markets. but there too i did not find any additional folders…

    is there any tool to somehow check the output of that php file so that one could track the source?

    thanks

    Thread Starter aovivo

    (@aovivo)

    just to be clear: i am talking about the text format (no HTML) order confirmation email that the seller receives (‘you have a new order’)…

    same line break issue i am facing in the paypment method section…
    best regards

    I had a look at text format emails on my dev site and as you say the address parts run together and are not properly formatted. Looks like a WordPress bug.

    The fix is to edit:
    wp-content/plugins/woocommerce/templates/emails/plain/email-addresses.php
    change the function get_formatted_shipping_address() to get_shipping_address() in two places.

    This will result in the various address parts being separated by comma-space, which is some improvement.

    To change the comma-space separator to a new line, edit:
    wp-content/plugins/woocommerce/includes/class-wc-order.php
    on lines 195 and 294, change the separator ‘, ‘ to “\n”. The “” are important.

    That covers the New order and Processing order emails. Other emails would need similar fixes.

    Check out how to override files using a child theme to avoid editing core files, as this would mean you lose the edits after an upgrade.

    Dear wordpress gurus,

    I want to translate to german the order-processing email in woocommerce,

    I hence used

    elseif( $lang == “german” ) _e( “Blabla, some german stuff”,’woocommerce’ );

    but that writes all on a single line, while I would like to have

    Blabla,
    some german stuff

    I tried to use a standard php
    echo “Blabla\n”;
    echo “some german stuff\n”;

    but the line breaks are still missing.

    Any clue?

    Thanks in advance,

    Xavier

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Order confirmation/receipt Email / HTML line breaks missing’ is closed to new replies.