diff --git a/src/services/VouchersService.php b/src/services/VouchersService.php index e3b9157..4562d34 100755 --- a/src/services/VouchersService.php +++ b/src/services/VouchersService.php @@ -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; }