Title: Sub order creation function
Last modified: April 27, 2025

---

# Sub order creation function

 *  Resolved [TregRek](https://wordpress.org/support/users/asgarcia103/)
 * (@asgarcia103)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/sub-order-creation-function/)
 * Hey! I’m trying to send some custom fields from the parent order into the sub
   orders created when a customer buys from different vendors but the “dokan_create_sub_order”
   function is deprecated and I can’t seem to find what took it’s place, could you
   help me with the name of the hook or function that creates those sub orders?

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

 *  [Md Fayeakuzzaman](https://wordpress.org/support/users/fayeakuzzaman/)
 * (@fayeakuzzaman)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/sub-order-creation-function/#post-18437961)
 * Hello [@asgarcia103](https://wordpress.org/support/users/asgarcia103/),
 * In Dokan Multivendor, the main hook that’s typically responsible for creating
   sub-orders (vendor orders) is `dokan_checkout_update_order_meta`. This hook works
   alongside the core function that handles the sub-order creation process.
 * The exact implementation might vary depending on which version of Dokan you’re
   using. If you need to hook into or modify the sub-order creation process, you
   might want to check the following hooks as well:
    - `dokan_create_sub_order`
    - `dokan_after_create_sub_order`
    - `dokan_checkout_update_order_meta`
 * Thanks!
 *  Thread Starter [TregRek](https://wordpress.org/support/users/asgarcia103/)
 * (@asgarcia103)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/sub-order-creation-function/#post-18438025)
 * Hey [@fayeakuzzaman](https://wordpress.org/support/users/fayeakuzzaman/)
 * I have downloaded the 3.14.11 Dokan Lite version and in the Includes folder I
   found the `dokan_create_sub_order` function as deprecated in the `wc-legacy-functions.
   php` file so that’s why my question was which function replaced it as I haven’t
   been able to find the `wc_deprecated_function( 'dokan_create_sub_order', '3.7.13','
   dokan()->order->create_sub_order()' )` function anywhere else in the files. It
   would be very helpful if you could point me in the direction of the files the
   have the hooks you mentioned before should they be still functional in the version
   I mentioned (3.14.11). Thanks for your answer and also thanks in advance for 
   your support.
 * Cheers!
    -  This reply was modified 1 year, 1 month ago by [TregRek](https://wordpress.org/support/users/asgarcia103/).
 *  [Md Fayeakuzzaman](https://wordpress.org/support/users/fayeakuzzaman/)
 * (@fayeakuzzaman)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/sub-order-creation-function/#post-18439371)
 * Hello [@asgarcia103](https://wordpress.org/support/users/asgarcia103/),
 * Thank you for getting back to us!
 * I’m sharing two functions that will help you create sub-orders. The first function
   is for manually creating a sub-order, while the second one is used for automating
   the sub-order creation process.
    1. `dokan()->order->maybe_split_orders( $parent_order_id, $force_create = false):
       void`
       This function allows you to manually split and create sub-orders for the
       given parent order.
    2. `dokan()->order->create_sub_order( $parent_order, $seller_id, $seller_products):
       void`
       This function is for automating the creation of sub-orders based on the
       parent order, seller ID, and products associated with the seller.
 * Let me know if you need further clarification!
 * Thanks!
 *  [Md Fayeakuzzaman](https://wordpress.org/support/users/fayeakuzzaman/)
 * (@fayeakuzzaman)
 * [1 year, 1 month ago](https://wordpress.org/support/topic/sub-order-creation-function/#post-18448743)
 * Hello [@asgarcia103](https://wordpress.org/support/users/asgarcia103/),
 * As we haven’t heard back from you for a while, we’ll consider this topic resolved.
   If you encounter any further issues, please don’t hesitate to open a new topic.
 * Thanks!

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

The topic ‘Sub order creation function’ is closed to new replies.

 * ![](https://ps.w.org/dokan-lite/assets/icon-256x256.gif?rev=3239229)
 * [Dokan: AI Powered WooCommerce Multivendor Marketplace Solution – Build Your Own Amazon, eBay, Etsy](https://wordpress.org/plugins/dokan-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dokan-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dokan-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/dokan-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dokan-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dokan-lite/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Md Fayeakuzzaman](https://wordpress.org/support/users/fayeakuzzaman/)
 * Last activity: [1 year, 1 month ago](https://wordpress.org/support/topic/sub-order-creation-function/#post-18448743)
 * Status: resolved