Title: Description Missing New Lines
Last modified: June 9, 2021

---

# Description Missing New Lines

 *  Resolved [adwjoe](https://wordpress.org/support/users/adwjoe/)
 * (@adwjoe)
 * [5 years ago](https://wordpress.org/support/topic/description-missing-new-lines/)
 * Hi,
 * My product descriptions are missing the new lines when imported into the website.
 * When entered into Square I use the enter button to add new lines. When imported
   into WooCommerce the new lines are missing.
 * Is this a database collation issue? An nl2br issue? This is really ruining the
   formatting of the product page and I could do with fixing it.
 * Thank you.
 * Joe

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

 *  Plugin Support [wpnomad a11n](https://wordpress.org/support/users/wpnomad/)
 * (@wpnomad)
 * [5 years ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14540047)
 * Hi [@adwjoe](https://wordpress.org/support/users/adwjoe/) ,
 * > `My product descriptions are missing the new lines when imported into the website.
   > When entered into Square I use the enter button to add new lines. When imported
   > into WooCommerce the new lines are missing.
   > Is this a database collation issue? An nl2br issue? This is really ruining 
   > the formatting of the product page and I could do with fixing it.`
 * Is the entire text of the description being imported, but are missing any line
   breaks? Or do you mean that after the first line, the content of description 
   from second line onwards are not being imported to WooCommerce entirely?
 * Do let us know so we can check and help further.
 *  Thread Starter [adwjoe](https://wordpress.org/support/users/adwjoe/)
 * (@adwjoe)
 * [5 years ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14540313)
 * The entire description is imported into WooCommerce, but it is missing the new
   lines between paragraphs.
 * For example, a product description on Square is:
 * > 3.8%
   > Small Pale
   > Taking a bijou interval from Brobdingnagian brewage to reveal a petite pale
   > ale of graceful proportion.
 * Once imported into WooCommerce the description is now:
 * > 3.8% Small Pale Taking a bijou interval from Brobdingnagian brewage to reveal
   > a petite pale ale of graceful proportion.
 *  Plugin Support [B C. a11n](https://wordpress.org/support/users/battouly/)
 * (@battouly)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14542966)
 * Hi [@adwjoe](https://wordpress.org/support/users/adwjoe/),
 * Thanks for the clarification.
 * Currently, Square doesn’t support using HTML formatting in the product description.
   When you import an item in Square with HTML tags, the tags will be stripped.
 * If you want to add formatted product description, you will have to add it in 
   your WooCommerce site directly.
 *  Thread Starter [adwjoe](https://wordpress.org/support/users/adwjoe/)
 * (@adwjoe)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14544418)
 * I’m not using HTML formatting in the description.
 * I’m adding new lines in a text-area in exactly the same way as I’m adding them
   into this text-area that I’m typing in right now.
 * This should be supported out of the box without needing to manually adjust the
   descriptions for each product in WooCommerce.
 * Where is the data stored for each product on my server? I’ve looked through the
   entire MySQL database but can’t find it. Is the data stored in a file somewhere?
   I’m self-hosted with complete access to my server and db.
 *  Thread Starter [adwjoe](https://wordpress.org/support/users/adwjoe/)
 * (@adwjoe)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14544857)
 * I found the data in wp_posts.
 * Why are the new lines being stripped out? This is really frustrating. Formatting
   text to add paragraphing is essential in product communication.
 * In a working environment I cannot double my workload by having to enter the data
   twice, once in Square and again in WooCommerce. The data already exists once 
   formatted the right way, so I just want that data formatted the same way.
 * Could you point me to exactly where on the server I can find the function which
   handles import? I’d like to have a play around to fix this.
 * Thanks!
 *  [melinda a11n](https://wordpress.org/support/users/melindahelt/)
 * (@melindahelt)
 * Automattic Happiness Engineer
 * [4 years, 12 months ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14546885)
 * The line breaks that you are adding in Square are also considered HTML and that
   is why they are being stripped out.
 * I would recommend adding the details into WC and syncing it to Square and see
   if that works better for you.
 *  Thread Starter [adwjoe](https://wordpress.org/support/users/adwjoe/)
 * (@adwjoe)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14546998)
 * Line breaks entered into text areas are not HTML and they are essential for product
   descriptions. Even if they are HTML the fact there isn’t a condition to allow
   <br/> into the description is baffling me. Formatting text is a key part of selling
   online.
 * Setting WooCommerce as the Product System of Record is an unworkable suggestion.
   I will be having between 500-1000 lines of constantly changing beers with a physical
   shop that is also selling over the counter. I need the register – Square – to
   be the System of Record.
 * Please, please could someone point out where in the code the import is happening?
   I’ve had a cursory glance but I’ve got another 1001 things I’m having to get 
   ready for this shop so haven’t dived in deep yet. I wish to manually edit the
   code to fix this issue. I’m aware there is a risk I may break the entire plugin
   but I am willing to take that risk. It’s my risk to take.
 * Thank you.
 *  Plugin Support [Thu P. a11n](https://wordpress.org/support/users/thup90/)
 * (@thup90)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14550465)
 * Hi there,
 * > Line breaks entered into text areas are not HTML and they are essential for
   > product descriptions. Even if they are HTML the fact there isn’t a condition
   > to allow <br/> into the description is baffling me. Formatting text is a key
   > part of selling online.
 * I understand having line breaks is important to you when syncing from Square 
   to WooCommerce. We’d appreciate your suggestion if you could add it in our Ideas
   board, it’s where our developers go to for feature ideas:
 * [https://ideas.woocommerce.com/forums/133476-woocommerce](https://ideas.woocommerce.com/forums/133476-woocommerce)
 * > Please, please could someone point out where in the code the import is happening?
 * Product sync functions are located under woocommerce-square/includes/Sync/
 * Feel free to get back to us in case you have any additional questions!
    -  This reply was modified 4 years, 12 months ago by [Thu P. a11n](https://wordpress.org/support/users/thup90/).
 *  Thread Starter [adwjoe](https://wordpress.org/support/users/adwjoe/)
 * (@adwjoe)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14563800)
 * Hi Thu P. a11n,
 * Thank you for pointing me in the right direction.
 * I have found the source of the problem and have posted the solution on the ideas
   board. I have tested it on my site and it works.
 * It is simply a case of changing the WooCommerce function used on line 1311 of`
   woocommerce-square/includes/Sync/Product_Import.php` to sanitise the data from`
   wc_clean()` to `wc_sanitize_textarea()`.
 * It’s an incredibly easy fix. I hope the developers can pick up this low hanging
   fruit!
 * Here is the thread on the ideas board:
    [https://ideas.woocommerce.com/forums/133476-woocommerce/suggestions/43646910-keep-new-lines-in-product-description](https://ideas.woocommerce.com/forums/133476-woocommerce/suggestions/43646910-keep-new-lines-in-product-description)
 * Regards,
    Joe
    -  This reply was modified 4 years, 11 months ago by [adwjoe](https://wordpress.org/support/users/adwjoe/).
 *  Plugin Support [Saravanan S, a11n](https://wordpress.org/support/users/simplysaru/)
 * (@simplysaru)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14565191)
 * Hey [@adwjoe](https://wordpress.org/support/users/adwjoe/),
 * Thanks for adding the solution to the Ideas board.
    I will work towards getting
   the attention of the devs to this suggestion of yours.
 *  Plugin Support [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * (@fernashes)
 * Automattic Happiness Engineer
 * [4 years, 11 months ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14606628)
 * We haven’t heard back from you in a while, so I’m going to mark this as resolved–
   if you have any further questions, you can start a new thread.

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

The topic ‘Description Missing New Lines’ is closed to new replies.

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

## Tags

 * [product description](https://wordpress.org/support/topic-tag/product-description/)

 * 11 replies
 * 7 participants
 * Last reply from: [Hannah S.L.](https://wordpress.org/support/users/fernashes/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/description-missing-new-lines/#post-14606628)
 * Status: resolved