Skip to content

Commit

Permalink
Fix gift voucher attaching to emails, even when disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Jan 21, 2021
1 parent 50121ad commit 6652ab2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/VouchersService.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ public function onBeforeSendEmail(MailEvent $event)
}

// Check this is an email we want to attach the voucher PDF to
if (!isset($settings->attachPdfToEmails[$commerceEmail->uid])) {
$matchedEmail = $settings->attachPdfToEmails[$commerceEmail->uid] ?? null;

if (!$matchedEmail) {
return;
}

Expand Down

0 comments on commit 6652ab2

Please sign in to comment.