Title: Order Notes
Last modified: January 19, 2021

---

# Order Notes

 *  Resolved [jeffatrmc](https://wordpress.org/support/users/jeffatrmc/)
 * (@jeffatrmc)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/)
 * Hi There,
 * Is there any way to export the order notes? I have looked through all of the 
   options and don’t see any option to export the notes included in WooCommerce 
   orders. I am open to a php solution if need be.
 * Best,
    Jeff

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

 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13930747)
 * hi Jeff
 * Please, open section “Setup Fields” and drag field “Order Notes” or “Customer
   Note”.
 * if you see only GREEN fields — turn off “Summary by products” mode.
 * thanks, Alex
 *  Thread Starter [jeffatrmc](https://wordpress.org/support/users/jeffatrmc/)
 * (@jeffatrmc)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13934289)
 * Hi [@algolplus](https://wordpress.org/support/users/algolplus/)
 * This is great. Is there any way to have individual order notes separated by “/”?
   Right now it pushes them together so it is hard to tell where one order note 
   begins and where another ends.
 * Also, it puts all of the order notes in one section which will be covered up 
   by other columns. Is there any way to have it create another row when the order
   notes section is too long?
 * Let me know what is possible.
 * Best,
    Jeff
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13934466)
 * hi Jeff
 * open section “Misc Settings” and add this PHP code.
    thanks , Alex
 *     ```
       add_filter('woe_get_order_value_order_notes',function ($value, $order,$fieldname) {
       	return preg_replace( "/\r|\n/", "/", $value);
       },10,3);
       ```
   
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13934468)
 * I think ti’s possible to add each note as separate row.
    But you should be PHP
   programmer.
 * please, check this page [https://docs.algolplus.com/algol_order_export/add-product-rows/](https://docs.algolplus.com/algol_order_export/add-product-rows/)
 *  Thread Starter [jeffatrmc](https://wordpress.org/support/users/jeffatrmc/)
 * (@jeffatrmc)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13934731)
 * Hi [@algolplus](https://wordpress.org/support/users/algolplus/)
 * This brings me to a follow up question. Is there any way to only export the most
   recent order note through misc settings? I tried unchecking export all order 
   notes but it didn’t seem to change anything.
 * Best,
    Jeff
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13935988)
 * You should replace previous code with this version
 *     ```
       add_filter('woe_get_order_value_order_notes',function ($value, $order,$fieldname) {
         $records = explode("\n",$value);
         return reset($records);
       },10,3);
       ```
   
 *  Thread Starter [jeffatrmc](https://wordpress.org/support/users/jeffatrmc/)
 * (@jeffatrmc)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13939397)
 * Hi [@algolplus](https://wordpress.org/support/users/algolplus/)
 * This is another great step. However, I now see that it is counting an “enter 
   key” within a single order note as the beginning of a new note.
 * For instance when you send a note to a customer and start off with:
    “Hello John,
 * Your order has been…”
 * It thinks Hello John, is its own separate note instead of just the beginning 
   of the complete note. Is there any way to adjust this so it doesn’t read an enter
   as a new note?
 * Best,
    Jeff
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13939538)
 * ok, I got it.
    but it’s more complex
 *     ```
       add_filter('woe_get_order_value_order_notes',function ($value, $order,$fieldname) {
          $args = array(
       		'post_id' 	=> $order->id,
       		'approve' 	=> 'approve',
       		'type' 		=> 'order_note',
       		'search'        => '',
           );
           // woocommerce hides such records by default
           remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10 );
           $notes = get_comments( $args );
           add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
   
           $value = '';
           if(!empty($notes)) {
               $value = $notes[0]->comment_content;
           }
           return $value;
       },10,3);
       ```
   
 *  Thread Starter [jeffatrmc](https://wordpress.org/support/users/jeffatrmc/)
 * (@jeffatrmc)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13939609)
 * Hi [@algolplus](https://wordpress.org/support/users/algolplus/)
 * This is amazing! Thank you a ton for helping me with this!
 * Best,
    Jeff
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13941042)
 * you’re very welcome

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

The topic ‘Order Notes’ is closed to new replies.

 * ![](https://ps.w.org/woo-order-export-lite/assets/icon-256x256.png?rev=1365554)
 * [Advanced Order Export For WooCommerce](https://wordpress.org/plugins/woo-order-export-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-order-export-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-order-export-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-order-export-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-order-export-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-order-export-lite/reviews/)

## Tags

 * [exporting](https://wordpress.org/support/topic-tag/exporting/)
 * [order notes](https://wordpress.org/support/topic-tag/order-notes/)

 * 10 replies
 * 2 participants
 * Last reply from: [algol.plus](https://wordpress.org/support/users/algolplus/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/order-notes-11/#post-13941042)
 * Status: resolved