Skip to content

Commit

Permalink
= 4.2.6.4 =
Browse files Browse the repository at this point in the history
~ Fixed: save order on the backend.
  • Loading branch information
tungnxt89 committed Mar 12, 2024
1 parent af897d8 commit 3933e0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/custom-post-types/order.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ public function save( int $post_id, WP_Post $post ) {

$created_via = $order->get_created_via();
if ( empty( $created_via ) ) {
$created_via = 'manual';
$order->set_created_via( 'manual' );
}

if ( isset( $_POST['order-customer'] ) ) {
if ( isset( $_POST['order-customer'] ) && $created_via === 'manual' ) {
$user_id = LP_Request::get_param( 'order-customer' );
$order->set_user_id( $user_id );
}
Expand Down

0 comments on commit 3933e0f

Please sign in to comment.