-
-
Save vicskf/8a6e772c839e3fcdcd8e84faac8589f7 to your computer and use it in GitHub Desktop.
Event Tickets Plus > Attendee Meta > Workaround for users not being able to edit their submitted data
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 | |
/** | |
* Renders the meta fields for order editing | |
* | |
* Override this template in your own theme by creating a file at: | |
* | |
* [your-theme]/tribe-events/tickets-plus/orders-edit-meta.php | |
* | |
* @version 4.4.3 | |
* | |
*/ | |
$ticket = get_post( $attendee['product_id'] ); | |
if ( empty( $ticket ) ) { | |
?> | |
<p><?php esc_html_e( 'Ticket deleted: attendee info cannot be updated.', 'event-tickets-plus' ); ?></p> | |
<?php | |
return; | |
} | |
$meta = Tribe__Tickets_Plus__Main::instance()->meta(); | |
$meta_enabled = get_post_meta( $ticket->ID, '_tribe_tickets_meta', true ); | |
if ( $meta_enabled ) { | |
?> | |
<div class="tribe-event-tickets-plus-meta" id="tribe-event-tickets-plus-meta-<?php echo esc_attr( $ticket->ID ); ?>" data-ticket-id="<?php echo esc_attr( $ticket->ID ); ?>"> | |
<a class="attendee-meta toggle show"><?php esc_html_e( 'Toggle attendee info', 'event-tickets-plus' ); ?></a> | |
<div class="attendee-meta-row"> | |
<?php | |
$meta_fields = $meta->get_meta_fields_by_ticket( $ticket->ID ); | |
foreach ( $meta_fields as $field ) { | |
echo $field->render( $attendee['attendee_id'] ); | |
} | |
?> | |
</div> | |
</div> | |
<?php } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment