Last active
August 29, 2015 14:05
-
-
Save joshfeck/945cd05eb792c74481b4 to your computer and use it in GitHub Desktop.
loop through each attendee and build ticket links. EE3 + Multi Event Registration (aka mer)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$sql = "SELECT id FROM " . EVENTS_ATTENDEE_TABLE . " WHERE attendee_session = %s"; | |
$attendees = $wpdb->get_col( $wpdb->prepare( $sql, $payment_data['attendee_session'] )); | |
foreach ($attendees as $attendee_id) { | |
?> | |
<tr> | |
<td><?php _e('Ticket Link: ','event_espresso'); | |
echo espresso_ticket_links($registration_id, $attendee_id); ?> | |
</td> | |
</tr> | |
<?php } | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//same thing, + the ticket type | |
$sql = "SELECT id, price_option FROM " . EVENTS_ATTENDEE_TABLE . " WHERE attendee_session = %s"; | |
$attendees = $wpdb->get_results( $wpdb->prepare( $sql, $payment_data['attendee_session'] )); | |
foreach ($attendees as $attendee_id) { | |
?> | |
<table> | |
<tr> | |
<td>Ticket Link:</td> | |
<td><?php echo espresso_ticket_links($registration_id, $attendee_id->id); ?></td> | |
</tr> | |
<tr> | |
<td>Ticket Type: </td> | |
<td><?php echo $attendee_id->price_option; ?></td> | |
</tr> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment