Title: Export order notes returning blank data
Last modified: December 20, 2020

---

# Export order notes returning blank data

 *  [goodlocalej](https://wordpress.org/support/users/goodlocalej/)
 * (@goodlocalej)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/export-order-notes-returning-blank-data/)
 * Order notes is set up as a field but when I add it to my export, it does not 
   return any data
 * I want to see all the order notes that appear in the order notes box in a woocommerce
   order
    – changes in stock – payment notes

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

 *  Thread Starter [goodlocalej](https://wordpress.org/support/users/goodlocalej/)
 * (@goodlocalej)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/export-order-notes-returning-blank-data/#post-13812983)
 * I found the export all order notes option.
 * Is there a way I can filter results by order note
 * I am looking to only export orders where order note = The card’s security code
   is incorrect
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/export-order-notes-returning-blank-data/#post-13813191)
 * Hello
 * 1. You have to add new field using this way
    [https://docs.algolplus.com/algol_order_export/fields/](https://docs.algolplus.com/algol_order_export/fields/)
 * 2. check “date_processed” example to see how to work with order notes
    [https://docs.algolplus.com/algol_order_export/add-new-fields/](https://docs.algolplus.com/algol_order_export/add-new-fields/)
 * thanks, Alex
 *  Thread Starter [goodlocalej](https://wordpress.org/support/users/goodlocalej/)
 * (@goodlocalej)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/export-order-notes-returning-blank-data/#post-13814331)
 * hello alex.
 * this helps. i can see the orders i want because they show date processing.
 * how can i change my code to exclude orders that i do not want
 * // add field “Date Processed”, based on order’s comments
    add_filter(‘woe_get_order_fields’,
   function ($fields) { $fields[‘date_processed’] = array( ‘label’ => ‘Date Processed’,‘
   colname’ =>’Date Processed’, ‘segment’ => ‘common’, ‘format’=>’date’, ‘checked’
   => 1 ); return $fields; }); add_filter(‘woe_get_order_value_date_processed’, 
   function ($value,$order,$fieldname) { $args = array( ‘post_id’ => $order->id,‘
   approve’ => ‘approve’, ‘type’ => ‘order_note’, ‘search’ => ‘security code is 
   incorrect’, ); // 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 );
 *  $date_processed = ”;
    if(!empty($notes)) { $date_processed = $notes[0]->comment_date;}
   return $date_processed; },10, 3);
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/export-order-notes-returning-blank-data/#post-13815603)
 * my bad, I misunderstand you.
    So please, IGNORE my previous replies!
 * open section “Misc Settings” and add following PHP code.
    thanks, Alex
 *     ```
       add_filter( 'woe_sql_get_order_ids_where', function($where, $settings ){
       global $wpdb;
       $where[] = " orders.ID IN (SELECT comment_post_ID FROM {$wpdb->comments} WHERE comment_content LIKE '%security code is incorrect%') ";
       return $where;
       },10,2);
       ```
   

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

The topic ‘Export order notes returning blank data’ 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/)

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