Include Event meta in Post Status Notifier email

Home Forums Calendar Products Events Calendar PRO Include Event meta in Post Status Notifier email

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1026046
    Luke
    Participant

    Hi I am using the Post Status Notifier plugin to send an email to the site admin when a new event is published.

    Post Status Notifier Lite


    http://codecanyon.net/item/post-status-notifier/4809420

    The plugin has shortcodes to allow custom fields to be included in the email but it would be great if I could somehow grab the event meta as well.

    The meta I need to include is the Start Date & Time and the Venue selected.

    Is this possible at all? Any assistance on this would be appreciated.

    Kind regards,
    Luke

    #1026488
    George
    Participant

    Hey Luke,

    Adding custom fields is indeed technically possible, but the act of wiring up Event meta specifically to that plugin is something a bit outside of the scope of our support forums, as it sounds like you’d have to modify code within that Post Notifier plugin.

    But in general, you can just use WordPress’ built-in meta functions to get event meta. Learn about the function get_post_meta() here, for example → https://developer.wordpress.org/reference/functions/get_post_meta/

    One other thing to note is that for some specific things, we also have “helper” functions that are even simpler than the WordPress meta functions.

    For example, you mention getting the start date for an event – you can do that with a function called simple tribe_get_start_date()

    Getting the Venue for a given event can be done as well by simply using tribe_get_venue()

    One last tip about all of this: to explore the available “helper functions” like tribe_get_start_date() and such, head into your The Events Calendar plugin files and navigate to this folder: src/functions/template-tags. Inside this folder are a bunch of named files, which indicate what type of helper functions are within them. So for example, the venue.php file here contains helper functions like the aforementioned tribe_get_venue() function.

    I hope this all helps!

    — George

    #1026729
    Luke
    Participant

    Hi George, thanks for the reply.

    This is certainly useful and has put me in the right direction.

    Kind regards,
    Luke

    #1028327
    George
    Participant

    I’m glad to hear that Luke! Best of luck with your project 🙂

    — George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Include Event meta in Post Status Notifier email’ is closed to new replies.