%event_start_time% Email placholder

WordPress Event Management, Calendars & Registration Forums General Question %event_start_time% Email placholder

This topic contains 2 replies, has 2 voices, and was last updated by  Tony 9 years, 11 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #15720

    Hi Stephen,

    I know it’s been asked before, but I am not able to figure out how to get this to work,
    even after studying the posts.
    How to use “event_start_time” as a function to add %event_start_time% as an email placholder?
    or has this be added to event organiser pro already?
    I would like to add the “event start time” to the email the ticket.

    If I follow the below example what should I use to replace this with?
    $event_id = eo_get_booking_meta( $booking_id, 'event_id' );
    $event = get_post( $event_id );
    $organiser = get_userdata( $event->post_author );
    $parsed_message = str_replace( '%organiser%', $organiser->display_name, $parsed_message );

    add_filter( ‘eventorganiser_email_template_tags’, ‘my_organiser_email_tag’, 10, 3 );
    function my_organiser_email_tag( $parsed_message, $booking_id, $original_message ){
    //$parsed_message Email body with tags parsed
    //$booking_id The booking ID
    //$original_message Email body without tags parsed

    $event_id = eo_get_booking_meta( $booking_id, ‘event_id’ );
    $event = get_post( $event_id );
    $organiser = get_userdata( $event->post_author );
    $parsed_message = str_replace( ‘%organiser%’, $organiser->display_name, $parsed_message );

    return $parsed_message;
    }

    Kind regards,
    Tony

    Tony
    #15729

    Hi Tony,

    The %event_date% placholder supports date/time formats:

    %event_date{jS F Y}{ g:ia}%
    

    (but this isn’t documented yet). Unfortunately a bug means that the e-mail preview in the admin settings won’t work with this. (This is fixed in 1.10.0).

    Stephen Harris
    #15731

    Hi Stephen,

    Thanks for the quick answer. The new date and time is working well in the email ticket.

    Kind regards,
    Tony

    Tony
Viewing 3 posts - 1 through 3 (of 3 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.