Skip to content

Commit

Permalink
Fix cs
Browse files Browse the repository at this point in the history
  • Loading branch information
nfourtythree committed Oct 24, 2023
1 parent 156022e commit 4eeb75c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/Emails.php
Original file line number Diff line number Diff line change
Expand Up @@ -692,11 +692,11 @@ public function sendEmail(Email $email, Order $order, ?OrderHistory $orderHistor
file_put_contents($tempPath, $renderedPdf);

$fileName = '';
$defaultFileName = $pdf->handle . '-' . $order->number;
if($pdf->fileNameFormat) {
$defaultFileName = $pdf->handle . '-' . $order->number;
if ($pdf->fileNameFormat) {
try {
$fileName = $view->renderObjectTemplate($pdf->fileNameFormat, $order);
}catch (\Throwable $e){
} catch (\Throwable $e) {
$fileName = $defaultFileName;
}
}
Expand Down

0 comments on commit 4eeb75c

Please sign in to comment.