Support » Plugin: WooCommerce » Line Breaks in Woo Emails

  • Resolved tyler1111

    (@tyler1111)


    I had to add some text to the customer-processing-order.php (email) but it’s just one big blob of text. I need to add some line breaks but nothing I have tried is working.

    Does anyone know how I could add line breaks to the text that the customer sees in the email they get after placing an order?

    Thank you.

    PS: Using Woocommerce 3.5.7 plugin

    • This topic was modified 5 months, 1 week ago by  .
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Praveen

    (@spraveenitpro)

    Automattic Happiness Engineer

    Hi @tyler1111

    You would like to have the email broken into paragraphs, Have you tried to wrap the text segments into individual <p> tags like this: https://cld.wthms.co/5khIR5 , this way you can break the blob of text into multiple paragraphs.

    Cheers!

    Hi Praveen,

    I tried adding <p> opening and closing tags to each paragraph but it just shows the tags with no line breaks.

    Thank you,
    Tyler

    Please paste your customer-processing-order.php here using pastebin.com

    tyler1111

    (@tyler1111)

    Hi Soft79,

    Here is my pastebin:

    https://pastebin.com/X3CQPGv9

    Thank you,
    Tyler

    Soft79

    (@josk79)

    Replace

    
    <p><?php printf( esc_html__( 'We appreciate your business!!
     
    Your order has been processed and your Receipt is located below.
     
    If you are a New Customer - Welcome! We will send you an email with your Login Details in the next few minutes – which will include your Login User ID & Temporary Password.
     
    If you are an Existing Customer, you can Login with your current User ID & Password. (If you cannot remember what your Password is, click on the “Forgot Your Password” link and reset it - as we do not have access to whatever password you chose.)
     
    Thanks again for your Purchase with ABL.
     
    Here’s to your good health,
    Bettie Brown', 'woocommerce' ), esc_html( $order->get_order_number() ) ); ?></p>
     
    <?php
    

    with:

    <p>We appreciate your business!!
     
    <p>Your order has been processed and your Receipt is located below.
     
    <p>If you are a New Customer - Welcome! We will send you an email with your Login Details in the next few minutes – which will include your Login User ID & Temporary Password.
     
    <p>If you are an Existing Customer, you can Login with your current User ID & Password. (If you cannot remember what your Password is, click on the “Forgot Your Password” link and reset it - as we do not have access to whatever password you chose.)
     
    <p>Thanks again for your Purchase with ABL.
     
    <p>Here’s to your good health,
    <p>Bettie Brown
    
    <?php
    
    tyler1111

    (@tyler1111)

    Thank you Soft79, you made it work! I really appreciate your help 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.