Home › Forums › Calendar Products › Community Events › Email Notification based on the selected Organizer
- This topic has 8 replies, 2 voices, and was last updated 11 years ago by
Brian.
-
AuthorPosts
-
March 23, 2015 at 12:36 pm #950223
sparxoo
ParticipantHi Tribe Team,
First, I just want to say thank you very much for your plugin. It is very helpful for us on a couple of our projects. Second, I wanted to know if there is any way in which the email address that gets notified when a user submits an event can be changed based on the organizer that is selected, or, event better, if an email address can be associated with a specific category. Thanks in advance for any help you can give me with this.
March 23, 2015 at 2:58 pm #950276Brian
MemberHi,
Thanks for using Community Events with the Events Calendar.
Unfortunately, there is not feature to change the notification based on any criteria. That is an interesting request and I can see the value in it.
If you would like to request that feature please head to our UserVoice Page and add your own or upvote that feature as they will increase the chances of it being added to a future version.
http://tribe.uservoice.com/forums/195723-feature-ideas
It could also be done with customization to the plugin, but that is beyond the support I can provide on the forum. I can help answer a question or two to get you started, but beyond that you are on your own.
Let me know if you have any follow up questions.
Thanks
March 24, 2015 at 6:03 am #950414sparxoo
ParticipantHi Brian,
Thank you for responding so quickly. I do have a couple questions. What file in the plugin controls the notification emails actually being sent out? Is it a file that I can override in my own theme? Does that file pull the addresses from a table in the database? What table would that be?
Thanks
March 24, 2015 at 7:14 am #950462Brian
MemberHello,
The function that sends the emails is not able to be moved to the theme to edit. That is only for templates in the view directories.
The notifications email are being sent to any email in this field “Email addresses to be notified” of the Community Event Settings:
Events > Settings > Community > “Email addresses to be notified”
The function that sends email is found in this file:
the-events-calendar-community-events\tribe-community-events\tribe-community-events.php
Around line 1209 in 3.9 is the function:
sendEmailAlerts
March 24, 2015 at 7:21 am #950467sparxoo
ParticipantHi Brian,
So does that mean that there is really no way to do what I am trying to do without actually changing code in the plugin? Of course, I would rather not do that because that will prevent me from ever being able to update the plugin.
March 24, 2015 at 12:09 pm #950553Brian
MemberThere is no way there to modify those functions to add a new method to notify Organizers without changing the plugin files, correct.
You maybe to use the hooks in the file:
the-events-calendar-community-events\tribe-community-events\Submission_Handler.php
do_action( ‘tribe_community_event_updated’, $this->event_id );
do_action( ‘tribe_community_event_created’, $this->event_id );
To run a function from a custom plugin or your theme that upon saving or updating sends an email to the organizer.
April 1, 2015 at 11:57 am #952613sparxoo
ParticipantHi Brian,
Sorry it has been a little while since I responded to you. I do have one quick question. Lets say that I have built my custom function to send an email using this function tribe_community_event_created. I noticed that the argument that I need for that hook is the event id. How do I get the event id for a event once it has been submitted?
April 1, 2015 at 12:08 pm #952615sparxoo
ParticipantHi Brian,
Please ignore my last question. I think I figured it out. Sorry, I am a little new to hooks but I believe it makes sense now.
April 2, 2015 at 7:26 am #952770Brian
MemberI am glad to see you were able to figure it out.
I am going to go ahead and close this ticket. If you have a similar issue or another in the future, please do not hesitate to create a new ticket.
Thanks!
-
AuthorPosts
- The topic ‘Email Notification based on the selected Organizer’ is closed to new replies.
