add ticket description to email.php

Home Forums Ticket Products Event Tickets Plus add ticket description to email.php

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #184361
    markavickers
    Participant

    What code would need to be added. It doesn’t look like the description is un the underlying function.

    #184894
    Barry
    Member

    Hi!

    There are a couple of ways you could do this, but it might be easiest to use the functions provided by this (unofficial) plugin – or you might just check out how it works “under the hood” to build a picture of the relationships between events and tickets. Either way that might help get you on track here.

    A brief summary of some of the customizations you can make and the available functions can be found here.

    I hope that helps!

    #186571
    markavickers
    Participant

    Thanks Barry. When I took a look, the plug in deems to deal with the cart as opposed to the actual ticket email.

    #186802
    Barry
    Member

    Well, it’s not specific to any particular page or template – it’s just that some of the examples relate to the cart page. On taking a second look, though, possibly all you need is a snippet like this one:

    $ticket_product_id = get_post_meta( $ticket['ticket_id'], '_tribe_wooticket_product', true );
    $ticket_product = get_post( $ticket_product_id );
    $ticket_description = $ticket_product->post_excerpt;

    You could use this at the appropriate point within the ticket template (of course, the $ticket array must be set so ideally you would use it within the main loop).

    Does that help?

    #187031
    markavickers
    Participant

    Barry you are a coding ROCKSTAR…. that was perfect. Slipped it into the email.php with a bit go html around it and it is awesome.

    Thanks so much

    #187837
    Barry
    Member

    Awesome! Happy to help 🙂

    I’ll go ahead and close this thread but if we can assist with anything else please do create new threads as needed.

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘add ticket description to email.php’ is closed to new replies.