Skip to content

Commit

Permalink
fix(order-sync): insert the order data to the sync table (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
saimonh3 authored and sabbir1991 committed Jul 5, 2018
1 parent e991500 commit 12000a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion includes/class-order-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,13 @@ function maybe_split_orders( $parent_order_id ) {
// record admin commision
$admin_fee = dokan_get_admin_commission_by( $parent_order, $seller_id );
$parent_order->update_meta_data( '_dokan_admin_fee', $admin_fee );

$parent_order->save();

// if the request is made from rest api then insert the order data to the sync table
if ( defined( 'REST_REQUEST' ) ) {
do_action( 'dokan_checkout_update_order_meta', $parent_order_id, $seller_id );
}

return;
}

Expand Down

0 comments on commit 12000a4

Please sign in to comment.