From 9f7b3dd5ee27ebd9912305add427158d90e81ab5 Mon Sep 17 00:00:00 2001 From: Devansh Date: Mon, 20 Jul 2020 16:34:09 +0530 Subject: [PATCH] Admin Email In Their Default Locale --- packages/Webkul/Admin/src/Listeners/Order.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/Webkul/Admin/src/Listeners/Order.php b/packages/Webkul/Admin/src/Listeners/Order.php index 95398c5b0..f2e1c06c5 100755 --- a/packages/Webkul/Admin/src/Listeners/Order.php +++ b/packages/Webkul/Admin/src/Listeners/Order.php @@ -16,22 +16,22 @@ class Order { /** * Send new order Mail to the customer and admin - * + * * @param \Webkul\Sales\Contracts\Order $order * @return void */ public function sendNewOrderMail($order) { try { + /* email to customer */ $configKey = 'emails.general.notifications.emails.general.notifications.new-order'; - - if (core()->getConfigData($configKey)) { + if (core()->getConfigData($configKey)) Mail::queue(new NewOrderNotification($order)); - } + /* email to admin */ $configKey = 'emails.general.notifications.emails.general.notifications.new-admin'; - if (core()->getConfigData($configKey)) { + app()->setLocale(env('APP_LOCALE')); Mail::queue(new NewAdminNotification($order)); } } catch (\Exception $e) { @@ -41,7 +41,7 @@ class Order /** * Send new invoice mail to the customer - * + * * @param \Webkul\Sales\Contracts\Invoice $invoice * @return void */ @@ -64,7 +64,7 @@ class Order /** * Send new refund mail to the customer - * + * * @param \Webkul\Sales\Contracts\Refund $refund * @return void */ @@ -83,7 +83,7 @@ class Order /** * Send new shipment mail to the customer - * + * * @param \Webkul\Sales\Contracts\Shipment $shipment * @return void */