Fix: Correcting subject on mail status update to display actuall status

This commit is contained in:
2026-09-29 01:03:35 +03:00
parent 1bcc6acd27
commit e9d90418fc
@@ -76,13 +76,17 @@ class OrderStatusUpdatedNotification extends BaseNotification
$order = $this->event->order; $order = $this->event->order;
$reference = OrderReferenceDisplay::resolve($order); $reference = OrderReferenceDisplay::resolve($order);
$statusLabel = config("lunar.orders.statuses.{$order->status}.label", $order->status);
return (new MailMessage) return (new MailMessage)
->subject(__('Your order :reference has been updated', ['reference' => $reference])) ->subject(__('Your order :reference is now :status', [
'reference' => $reference,
'status' => $statusLabel,
]))
->view('core::order.notifications.status-updated', [ ->view('core::order.notifications.status-updated', [
'order' => $order, 'order' => $order,
'reference' => $reference, 'reference' => $reference,
'statusLabel' => config("lunar.orders.statuses.{$order->status}.label", $order->status), 'statusLabel' => $statusLabel,
]); ]);
} }
} }