Home › Forums › Welcome! › Pre-Sales Questions › How can I get the Organisers email from the database?
- This topic has 3 replies, 2 voices, and was last updated 5 years, 8 months ago by stehen haywood.
-
AuthorPosts
-
August 14, 2018 at 5:37 am #1596894stehen haywoodParticipant
I’m trying to set up a future event notification and need the organizers email, but I cannot find any reference to it in the WP database. What table would it be in also.
Can anyone please help as my knowledge of MYSQL and PHP is very limited as it is. This is driving me crazy.
August 14, 2018 at 5:40 am #1596895stehen haywoodParticipantFrom ‘organizer.php’ I see that there is $filtered_email & $unfiltered_email
August 14, 2018 at 12:40 pm #1597427stehen haywoodParticipantOk, I found that the details I need are in the API. I can extract it using the url, e.g. (../wp-json/tribe/events/v1/organizers/2187) but I need to do that using php. Remembering that I just need the email.
August 15, 2018 at 1:32 pm #1598414CliffMemberHi, Stephen. Thanks for your detailed request.
Finding things via the REST API is resourceful (so kudos!) but not the best way unless you’re talking from SiteA to SiteB. Within a single site, you should just use PHP.
Our plugins utilize WordPress standards (custom post types and postmeta).
To get the email for an Organizer with Post ID 281, you would do this:
$email = get_post_meta( 281, '_OrganizerEmail', true );
Once you have that, you might want to run it through sanitize_email() and then pass it to some part of wp_mail() — or just display it somewhere.
Hopefully this helps!
Please let me know how this goes for you.
September 6, 2018 at 9:35 am #1615364Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘How can I get the Organisers email from the database?’ is closed to new replies.