Skip to content

Commit

Permalink
fix(total_sales_count): the total sales for each product calculates t…
Browse files Browse the repository at this point in the history
…wice when purchased from multiple vendor is fixed #249 (#250)
  • Loading branch information
saimonh3 authored and sabbir1991 committed May 11, 2018
1 parent ffa3d9d commit 7f4c20a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/class-order-manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ function create_sub_order( $parent_order, $seller_id, $seller_products ) {

if ( $order_id && !is_wp_error( $order_id ) ) {

// update total_sales count for sub-order
wc_update_total_sales_counts( $order_id );

// update author as vendor
wp_update_post( array(
'post_author' => $seller_id,
Expand Down

0 comments on commit 7f4c20a

Please sign in to comment.