Skip to content

Commit 6e24cb5

Browse files
authored
Merge pull request #928 from lexsmil/patch-3
add old_status to msOnBeforeChangeStatus and msOnChangeStatus events
2 parents afa3318 + 1aef047 commit 6e24cb5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/components/minishop2/model/minishop2/minishop2.class.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,8 @@ public function changeOrderStatus($order_id, $status_id)
843843

844844
$response = $this->invokeEvent('msOnBeforeChangeOrderStatus', [
845845
'order' => $order,
846-
'status' => $order->get('status'),
846+
'old_status' => $old_status->get('id'),
847+
'status' => $status_id,
847848
]);
848849
if (!$response['success']) {
849850
return $response['message'];
@@ -855,6 +856,7 @@ public function changeOrderStatus($order_id, $status_id)
855856
$this->orderLog($order->get('id'), 'status', $status_id);
856857
$response = $this->invokeEvent('msOnChangeOrderStatus', [
857858
'order' => $order,
859+
'old_status' => $old_status->get('id'),
858860
'status' => $status_id,
859861
]);
860862
if (!$response['success']) {

0 commit comments

Comments
 (0)