Description

The following code will show the time of registration / purchase of an RSVP / ticket on the attendee list of an event.

Usage

Copy the below code into your (child) theme’s functions.php file (or wherever you usually put custom code.

Plugins

Event Tickets, (Event Tickets Plus)

Snippet

add_action( 'event_tickets_attendees_table_ticket_column', 'add_registration_time_to_attendee_details' );
function add_registration_time_to_attendee_details( $item ) {

	if ( ! isset( $item['order_id'] ) ) {
		return;
	}

	if ( $item['provider_slug'] == 'woo' ) {
		$order_id = $item['qr_ticket_id'];
	}
	else {
		$order_id = $item['order_id'];
	}

	$registration_time = get_the_date( 'F j, Y', $order_id );

	if ( empty( $registration_time ) ) {
		return;
	}

	printf( '<div class="event-tickets-ticket-registration-time">%1$s:<br/>%2$s</div>', esc_html__( 'Registration Time', 'tribe-extension' ), sanitize_text_field( $registration_time ) );
}

Notes

  • Originally written in November 2018
  • Tested with Event Tickets 4.8.3
  • Author: András Guseo

Disclaimer

As with all of our recipes, please note that we share this in the hope it will be useful but without any guarantees or commitments. If you wish to use it, it is your responsibility to test it first of all and adapt it to your needs (or find someone who can do so on your behalf). We are unable to provide further support in relation to this recipe.