How can I get the Organisers email from the database?

Home Forums Welcome! Pre-Sales Questions How can I get the Organisers email from the database?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1596894
    stehen haywood
    Participant

    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.

    #1596895
    stehen haywood
    Participant

    From ‘organizer.php’ I see that there is $filtered_email & $unfiltered_email

    #1597427
    stehen haywood
    Participant

    Ok, 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.

    #1598414
    Cliff
    Member

    Hi, 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.

    #1615364
    Support Droid
    Keymaster

    Hey 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

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How can I get the Organisers email from the database?’ is closed to new replies.