save the order type when create a order with wc_create_order()

This commit is contained in:
claudiosmweb 2014-07-07 17:23:43 -03:00
parent 90110f300f
commit 16953e96f8
1 changed files with 3 additions and 0 deletions

View File

@ -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 );
}