Set created_via propery for orders created in admin area
This commit is contained in:
parent
3c35320f76
commit
1f5d4050b3
|
@ -600,6 +600,11 @@ class WC_Meta_Box_Order_Data {
|
|||
|
||||
$props['date_created'] = $date;
|
||||
|
||||
// Set created via prop if new post.
|
||||
if ( isset( $_POST['original_post_status'] ) && $_POST['original_post_status'] === 'auto-draft' ) {
|
||||
$props['created_via'] = 'admin';
|
||||
}
|
||||
|
||||
// Save order data.
|
||||
$order->set_props( $props );
|
||||
$order->set_status( wc_clean( $_POST['order_status'] ), '', true );
|
||||
|
|
Loading…
Reference in New Issue