Tickets date shown in the email

Home Forums Ticket Products Event Tickets Plus Tickets date shown in the email

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1102354
    Cowowo S.L
    Participant

    Hi, I have Events that are open for more than one day so I did multiple tickets, one ticket for each day of the event, but in the email send to the customer with the ticket the date that appears is the date of the Start event and not of the end of the ticket.

    I have to do an Event for each day then? or is it possible to change the date sended in the email for the end of the ticket date?

    #1102450
    Geoff
    Member

    Hey there and welcome to the forums!

    That’s correct — the tickets are tied to the start date of the event rather than the sale date of the tickets.

    It is certainly possible to modify the ticket email and remove the event date from it. The template is called email.php and is located in wp-content/plugins/event-tickets/src/views/tickets/email.php. I would also suggest checking out our Themer’s Guide for more details on how template overrides work as you get started.

    Sorry I don’t have more of a concrete answer for you here, but I hope this at least helps answer your question.

    Thanks!
    Geoff

    #1102915
    Cowowo S.L
    Participant

    Thank you for your answer, still you don’t have a function to get the value of the end date sale ticket? Thanks for the link to the themers guide it could be useful to modify different files.

    #1102985
    Geoff
    Member

    Hey there! Thanks for following up.

    I don’t have a specific function, but you can call the start date using something like this:

    <?php echo Tribe__Tickets__Ticket::get_instance( $ticket_id, ‘_ticket_end_date’ ); ?>

    I haven’t tested that, but hopefully it at least helps get you started to grab the ticket start date.

    Cheers!
    Geoff

    #1103055
    Cowowo S.L
    Participant

    Hi, I’ve been trying to put that piece of code in the place where is print the $start_date variable. I did a few modifications because this part is inside of foreach for de tickets array:

    <?php echo Tribe__Tickets__Ticket::get_instance( $ticket[‘ticket_id’], ‘_ticket_end_date’ ); ?>

    But that didn’t work, after a purchase the email for the tickets wasn’t sended.

    #1103162
    Geoff
    Member

    Here’s a function you could add to your functions.php file and then call in the template to return a  ticket’s end sale date:

    add_filter( 'event_tickets_email_include_end_date', 'tribe_show_tickets_end_date' );
    
    function tribe_show_tickets_end_date( $bool ) {
    return true;
    }

    I do want to note that we are fairly limited in how much we can support custom development questions like this, but I do hope this at least helps get you started!

    Thanks,
    Geoff

    #1103196
    Geoff
    Member

    Actually, scratch that. One of the developers on our team, George, took a stab at modifying the email template file and came up with a good example you can use to work off of. 🙂

    #1103681
    Cowowo S.L
    Participant

    Hi , thanks for your answer, I tried the email code and:
    get_post_meta( $ticket[‘ticket_id’], ‘_ticket_start_date’, true );

    That didn’t return anything, but don’t worry I told my client to put the date in the name of each ticket so the customers will not get confused.

    #1103769
    Geoff
    Member

    Shoot, I really thought the code in the email template would do the trick. I’m really sorry about that, but thanks for following up.

    If there’s anything else you need, please let us know in a new thread and we’d definitely be happy to help.

    Cheers,
    Geoff

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Tickets date shown in the email’ is closed to new replies.