Support

Home Forums Event Espresso Premium [ESPRESSO_MY_EVENTS] ticket link

[ESPRESSO_MY_EVENTS] ticket link

Posted: October 2, 2013 at 8:11 am


Klaus M

October 2, 2013 at 8:11 am

Hi guys,

using <?php echo $ticketing_installed == true?''.$ticket_link.'':''; ?> on the MY EVENTS LIST shows the FNAME LNAME linked to the ticket. I would like to have PRINT TICKET instead. How can i get the pure URL in order to make my own

Thanks!


Josh

  • Support Staff

October 3, 2013 at 8:23 am

Hi Klaus,

If you look at the code for the [ESPRESSO_MY_EVENTS] shortcode where it sets the $ticket_link variable it reads:

if (function_exists('espresso_ticket_launch')){
	$ticket_link = espresso_ticket_links($registration_id, $attendee_id);
}

The espresso_ticket_links function is located in the main.php file of the Event Espresso core plugin. What you can do is copy this into your own custom plugin and and re-name it. Then you can change the link text to be “Print Ticket” instead of where it outputs the attendee name:

$ticket_link .= '<a href="' . $ticket_url . '" target="_blank">' . $attendee->fname . ' ' . $attendee->lname . '</a>' . $break;

Once your custom function is in place, you swap in your custom function where it sets the $ticket_link variable.

The support post ‘[ESPRESSO_MY_EVENTS] ticket link’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso