Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter goodlocalej

    (@goodlocalej)

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

    Thread Starter goodlocalej

    (@goodlocalej)

    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

    Thread Starter goodlocalej

    (@goodlocalej)

    Where can I find the meta key?

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