Correctly set 'created_via' for HPOS orders created on the admin (#40469)

This commit is contained in:
Jorge A. Torres 2023-09-28 12:01:09 +01:00 committed by GitHub
parent 82ddee70a5
commit 3cfa509118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Correctly set 'created_via' for HPOS orders created on the admin.

View File

@ -384,6 +384,7 @@ class PageController {
$this->order = new $order_class_name();
$this->order->set_object_read( false );
$this->order->set_status( 'auto-draft' );
$this->order->set_created_via( 'admin' );
$this->order->save();
$this->handle_edit_lock();