Support » Plugin: Advanced Order Export For WooCommerce » refunds are not exporting

  • Resolved Matt

    (@visibledeals)


    Hello,
    I have a customer that made a purchase on 12/1/2020 and I refunded him on 12/04/2020.

    In the “filter order by” option the only option suitable for me to use is the “paid date” since it allows me to reconcile my previous day’s transaction amount to my bank account. But I noticed that refunds such as the one done on 12/04/2020 do not export under “paid date” option for that same date.

    I cannot use “modification date” since that will pull in transactions that were paid days ago and being captured since an action such as an account note or shipment occurred. That’s not going to work for my reconciliation.

    The “paid date” filter works great for capturing my orders on the day they were paid and I need that to happen with refunds too. When I filter 12/04/2020 for refunds I want to see the above-mentioned refund.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author algol.plus

    (@algolplus)

    Hello

    WooCommerce creates refund as child order.

    Please, upload your settings as new ticket to https://algolplus.freshdesk.com/
    thanks, Alex

    Thread Starter Matt

    (@visibledeals)

    Thanks I opened a ticket there.

    Plugin Author algol.plus

    (@algolplus)

    To solve the problem – this code was added to “Misc Settings”

    add_filter( "woe_get_order_ids", function($ids) {
    global $wpdb;
    $from_date = WC_Order_Export_Engine::$current_job_settings["from_date"];
    $to_date = WC_Order_Export_Engine::$current_job_settings["to_date"];
    $refunds = $wpdb->get_col("SELECT ID AS order_id FROM {$wpdb->prefix}posts AS orders WHERE orders.post_type in ( 'shop_order_refund') AND orders.post_date>='{$from_date} 00:00:00' AND orders.post_date<='{$to_date} 23:59:59'");
    return array_merge($ids,$refunds);
    });
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘refunds are not exporting’ is closed to new replies.