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);