save the order type when create a order with wc_create_order()
This commit is contained in:
parent
90110f300f
commit
16953e96f8
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue