Add isTransactional method to NewsletterEntity

[MAILPOET-6115]
This commit is contained in:
David Remer
2024-06-21 08:26:10 +03:00
committed by Veljko V
parent 2cba628c29
commit fd0d1036e6
3 changed files with 19 additions and 7 deletions

View File

@@ -608,4 +608,11 @@ class NewsletterEntity {
$campaignName = $this->getCampaignName();
return $campaignName ?: $this->getSubject();
}
public function isTransactional(): bool {
return in_array($this->getType(), [
NewsletterEntity::TYPE_AUTOMATION_TRANSACTIONAL,
NewsletterEntity::TYPE_WC_TRANSACTIONAL_EMAIL,
]);
}
}