plugins – How do I remove the filter from the orders and add custom status in Dokan?

Question

I would like to remove the filters in the orders tab from dokan dashboard. Here:

[![filters][1]][1]

I want to remove these status in the dokan dashboard:
[![status][2]][2]

Someone can tell me where the file of this filter part?
I want to add new custom status. I tried this:

// Add new status:
add_filter( 'wc_order_statuses', 'new_orders_vendor_status', 12, 1);
function new_orders_vendor_status($order_statuses){
    $order_statuses['wc-ox-progress-1'] = _x('Experiência realizada','Order status', 'text_domain' );
    $order_statuses['wc-ox-progress-2'] = _x('Repasse realizado','Order status', 'text_domain' );
    return $order_statuses;
}

//Remove some status

function dokan_dashboard_remove_processing_status( $statuses ){
    if (dokan_is_seller_dashboard() ) {
            unset( $statuses['wc-refunded'] );
            unset($statuses['wc-processing']);
            unset($statuses['wc-on-hold']);
            unset($statuses['wc-on-hold']);
            unset($statuses['wc-failed']);
    }

    return $statuses;
}
add_filter( 'wc_order_statuses', 'dokan_dashboard_remove_processing_status' );

is not working, someone can help me?
[1]: https://i.stack.imgur.com/aPAZ9.png
[2]: https://i.stack.imgur.com/UBFLV.png

0
Rodrigo Franco 2 weeks 2023-01-17T22:39:44-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse