Skip to content

Commit

Permalink
Updates audience recipients to respect audience enabled settings
Browse files Browse the repository at this point in the history
  • Loading branch information
BenParizek committed Nov 5, 2023
1 parent 79ece11 commit 8144cbf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/mailer/audience/AudienceHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
namespace BarrelStrength\Sprout\mailer\audience;

use BarrelStrength\Sprout\mailer\components\elements\audience\AudienceElement;
use BarrelStrength\Sprout\mailer\MailerModule;

class AudienceHelper
{
public static function getAudienceRecipients($audienceIds): array
{
$settings = MailerModule::getInstance()->getSettings();

if (!$settings->enableAudiences) {
return [];
}

if (empty($audienceIds)) {
return [];
}
Expand Down

0 comments on commit 8144cbf

Please sign in to comment.