Thread Starter
cari18
(@cari18)
I found the relevant solution for my previous question with the plugin extension : “Conditionals” which is exactly what I was looking for.
Now I would like to exclude some specfic users when the target is a role.
How to do that ?
Thread Starter
cari18
(@cari18)
Sorry I’ll try to clearer:
I would to send the e-mail to all users with a specified role, subscriber for example, except for these 2 or 3 users identified by mean of their userid or user-email.
Ahh, unfortunately, this isn’t possible with the add-on nor the base plugin. The only way to exclude the recipients is to use the programmatic filter. Are you comfortable putting the custom code on your site?
Thread Starter
cari18
(@cari18)
Not really, but if you give me some explanations I’ll try 😉
Is the code tobe added in function.php?
If so I can do, but I’m not able to write the code by myself 😥
Sure, functions.php of the child theme would work just fine!
This is your code: https://pastebin.com/8bydtLRw
There are two places to adjust the code:
– line 4. I wasn’t sure if this is the trigger you are using. Please refer to the docs to match the trigger name with the slug
– line 9 and 10. Exclude the emails 🙂
I hope this helps!
Thread Starter
cari18
(@cari18)
Thanks a lot Kuba I’ll try that.
Thread Starter
cari18
(@cari18)
The code applied, it works as promissed.
Thanks a lot
Awesome! Please consider leaving a short review of the plugin if you like it 🙂