• Resolved webalarm

    (@webalarm)


    Dear Support Team,

    I’m figuring out how to keep the linebreaks from the checkout Text area inputs, so they are displayed also in the order details page. e.g. when the customer needs to list names like that:

    Michael
    Julia
    Johannes
    Hannah

    it will not display the linebreaks in the order details page. It displays it without the linebreaks like “Michael Julia Johannes Hannah”.

    I googled for solutions, but we can’t fix that. But we found a function wc_sanitize_textarea() that could fix the problem – but how to use it?

    God bless you if you can help us with this little but big problem.

    Best Regards

    • This topic was modified 4 years ago by webalarm.
    • This topic was modified 4 years ago by webalarm.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Remi Corson

    (@corsonr)

    Automattic Happiness Engineer

    Hi @webalarm,

    I just tested on a local install and the line breaks were kept:


    Link to image: https://d.pr/i/DTbaU4


    Link to image: https://d.pr/i/ruRg3J

    As a first step, I’d suggest that you disable all extensions impacting the checkout process and test with a default theme to highlight any potential culprits.

    Thread Starter webalarm

    (@webalarm)

    Thank you for your time. The problem caused a checkout field plugin… damn, the solution was so easy.

    Have a nice week!

    Remi Corson

    (@corsonr)

    Automattic Happiness Engineer

    Hi @webalarm,

    Ha, that happens! ?? Thanks for the heads-up!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Checkout Text Field + Order Details: Keep (hard) Linebreaks’ is closed to new replies.