Don't add a CTA if an emails contains a P.S.
Don't automatically add a CTA to a daily email if the email body text already contains a "P.S.".
This commit is contained in:
parent
b7f13b4be5
commit
9abf64b504
2 changed files with 16 additions and 1 deletions
|
@ -22,7 +22,9 @@ readonly final class AddRandomCtaToDailyEmail {
|
|||
return;
|
||||
}
|
||||
|
||||
// TODO: Don't add a CTA if the email already contains a "P.S.".
|
||||
if (str_contains(haystack: $email->get('body')->value, needle: 'P.S.')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$nodeStorage = $this->entityTypeManager->getStorage('node');
|
||||
$query = $nodeStorage->getQuery();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue