Skip to content

Commit

Permalink
Merge pull request #928 from lexsmil/patch-3
Browse files Browse the repository at this point in the history
add old_status to msOnBeforeChangeStatus and msOnChangeStatus events
  • Loading branch information
biz87 authored Nov 4, 2024
2 parents afa3318 + 1aef047 commit 6e24cb5
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 6e24cb5

Please sign in to comment.