Posted: January 27, 2015 at 11:12 am
|
Hi! I’m currently migrating an EE3 site on to Event Espresso 4 (4.5.0.beta32). In EE3 I managed to change a core file so that the event admin only got an email notification upon registration if a certain question in the registration form (“Messages to the event admin”) was filled out. In EE4, I can’t even find the right place to look.. Where is the email to event admin upon registration fired from? I know you recommend against changing core files, but on this matter I have no choice in order to make my client satisfied. I also make sure to make small changes so that keeping the core files updated is a small problem. (I create a function in my functions.php that do the actual work of checking if the send conditions are met, the only change made to the EE core files are a call to that function and an if-statement checking if true or false was returned.) Any help appriciated. Thanks. Eivind
|
|
You’ll want to take a look at the actions and filters at the top of the file modules/messages/EED_Messages.module.php. |
|
Thanks for your reply! I couldn’t manage to make my own function run instead of yours, so I’m stuck with altering core code again. But that’s okay. I’ve assumed the relevant function is the maybe_registration function, since that is the function I would’ve been able to hook into. I need to send the email to the registered attendee, but not to the event admin. As I’m working my way through that function, I realize that I might not be in the right place? There’s nothing in that function that’s looping through both attendee and admin, allowing me to halt the sending to the admin, is there? If not, where does that happen? Thanks again! Eivind |
Hello Eivind, I’m not quite sure I’m following your logic, but if you look at the maybe_registration() method, you’ll see where it does this:
is_mt_active returns an array of active types. That might be a good place to add another conditional, but please do not hack the core method. You can unhook this via the |
|
The support post ‘EE4: Changing event admin email notification behaviour’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.