Title: Private Notes Only
Last modified: April 21, 2021

---

# Private Notes Only

 *  Resolved [neilgee](https://wordpress.org/support/users/neilgee/)
 * (@neilgee)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/private-notes-only/)
 * Hi,
    Looking to export Private Notes only from WooCommerce Orders – seen this
   [solution](https://wordpress.org/support/topic/private-notes-and-customer-notes/)
   but that also outputs Order status changes:
 *     ```
       "Order status changed from Pending payment to Processing.
       This is a private note added
       Order status changed from Processing to Completed."
       ```
   
 * How can the referred code be changed just to show Private Notes Only:
 *     ```
       add_filter('woe_get_order_value_private_notes',function ($value, $order,$fieldname) {
       	remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ) );
       	$args  = array(
       		'post_id' => $order->get_id(),
       		'approve' => 'approve',
       		'type'    => 'order_note',
       		'orderby' => 'comment_ID',
       		'order'   => 'ASC',
       		);
       	$notes = get_comments( $args );
       	add_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' )  );
   
       	$lines = array();
       	foreach($notes as $note) {
       		if($note->comment_author!='WooCommerce' AND !get_comment_meta( $note->comment_ID, 'is_customer_note', true ) ) 
       			$lines[] = $note->comment_content;
       	}
       	return join("\n",$lines);
       },10,3);
       ```
   
 * Many Thanks

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

 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/private-notes-only/#post-14345928)
 * hello
 * you can modify this line
    `if($note->comment_author!='WooCommerce' AND !get_comment_meta(
   $note->comment_ID, 'is_customer_note', true ) )`
 * just replace it with
    `if($note->comment_author!='WooCommerce' AND !get_comment_meta(
   $note->comment_ID, 'is_customer_note', true ) AND strpos($note->comment_content,"
   Order status changed")===false )`
 *  Thread Starter [neilgee](https://wordpress.org/support/users/neilgee/)
 * (@neilgee)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/private-notes-only/#post-14349238)
 * Perfect – thanks!
 *  Plugin Author [algol.plus](https://wordpress.org/support/users/algolplus/)
 * (@algolplus)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/private-notes-only/#post-14349619)
 * you’re welcome

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

The topic ‘Private Notes Only’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [algol.plus](https://wordpress.org/support/users/algolplus/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/private-notes-only/#post-14349619)
 * Status: resolved