Skip to content

Commit

Permalink
add old_status to msOnBeforeChangeStatus and msOnChangeStatus events
Browse files Browse the repository at this point in the history
  • Loading branch information
lexsmil authored Oct 25, 2024
1 parent afa3318 commit 1aef047
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,8 @@ public function changeOrderStatus($order_id, $status_id)

$response = $this->invokeEvent('msOnBeforeChangeOrderStatus', [
'order' => $order,
'status' => $order->get('status'),
'old_status' => $old_status->get('id'),
'status' => $status_id,
]);
if (!$response['success']) {
return $response['message'];
Expand All @@ -855,6 +856,7 @@ public function changeOrderStatus($order_id, $status_id)
$this->orderLog($order->get('id'), 'status', $status_id);
$response = $this->invokeEvent('msOnChangeOrderStatus', [
'order' => $order,
'old_status' => $old_status->get('id'),
'status' => $status_id,
]);
if (!$response['success']) {
Expand Down

0 comments on commit 1aef047

Please sign in to comment.