Hi @maurosp91,
According to our support policy, we are unable to review a custom code. If you want to get all the orders of a vendor then you can use the dokan_get_seller_orders
this function. To see the code example of the function you can have a look at wp-content/plugins/dokan-lite/includes/Order/functions.php
this file.
I hope this will help. Thanks!
I got with the solution:
$query = new WC_Order_Query( array(
'limit' => 300,
'post_type' => 'shop_order',
'meta_key' => '_dokan_vendor_id',
'meta_value' => $seller_id,
'post_status' => array_keys( wc_get_order_statuses() ),
'status' => array('wc-processing', 'wc-on-hold', 'wc-pending'),
'return' => 'ids',
) );
$user_orders = $query->get_orders();
I get all the order ids from a seller, and with certain order status.
Hope it helps someone else!
Hi @maurosp91,
Great to know that it worked for you. We are marking this topic as closed as the purpose of this topic has been served. Feel free to open a new one if you face any further issues or need further assistance with anything.
Thanks!