diff --git a/includes/Order/Hooks.php b/includes/Order/Hooks.php index 22597eb98a..248cd6067b 100644 --- a/includes/Order/Hooks.php +++ b/includes/Order/Hooks.php @@ -36,11 +36,11 @@ public function __construct() { // create sub-orders add_action( 'woocommerce_checkout_update_order_meta', [ $this, 'split_vendor_orders' ] ); - add_action( 'woocommerce_store_api_checkout_update_order_meta', [ $this, 'split_vendor_orders' ] ); + add_action( 'woocommerce_store_api_checkout_order_processed', [ $this, 'split_vendor_orders' ] ); // order table synced for WooCommerce update order meta add_action( 'woocommerce_checkout_update_order_meta', 'dokan_sync_insert_order', 20 ); - add_action( 'woocommerce_store_api_checkout_update_order_meta', 'dokan_sync_insert_order', 20 ); + add_action( 'woocommerce_store_api_checkout_order_processed', 'dokan_sync_insert_order', 20 ); // order table synced for dokan update order meta add_action( 'dokan_checkout_update_order_meta', 'dokan_sync_insert_order' );