Skip to content

Commit

Permalink
save the order type when create a order with wc_create_order()
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiosanches committed Jul 7, 2014
1 parent 90110f3 commit 16953e9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions includes/wc-core-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ function wc_create_order( $args = array() ) {
update_post_meta( $order_id, '_customer_user', $args['customer_id'] );
}

// Set the order type.
wp_set_object_terms( $order_id, 'simple', 'order_type' );

return new WC_Order( $order_id );
}

Expand Down

0 comments on commit 16953e9

Please sign in to comment.