• Resolved kkjj

    (@kkjj)


    Hi

    I am using Dokan multivendor plugin. I need to output the orders, however when I do this if there is an order where someone has purchased products from multiple stores it creates orders and suborders. The order is everything in the purchase and the suborder is everything sorted based on the individual vendor. Basically, it ends up double counting. Is there any way of only getting the orders as opposed to suborders. Either that or I need a column which can tell me if it is an order or suborder.

    I got this information from the developers of Dokan

    If an order has no child, that means it is a single order and no sub order exists for that order.
    If any order has sub order then the sub order id is different than the parent order id.
    Navigate through WP content > Plugins > Dokan lite > includes > class-order-manager.php, there is a function called on_sub_order change. Inside this function, you will see this on line number 80.
    $sub_orders = get_children( array( ‘post_parent’ => $parent_order_id, ‘post_type’ => ‘shop_order’ ) );
    Then if you print that order, your will see the parent order id for each of the sub order.

    Thanks a lot

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Suborders’ is closed to new replies.