Tribe__Tickets__Tickets::save_checkin_details( int $attendee_id, mixed $qr )

Save the attendee checkin details.


Parameters

$attendee_id

(int) (Required) The ID of the attendee that's being checked-in.

$qr

(mixed) (Required) True if the check-in is from a QR code.


Top ↑

Source

File: src/Tribe/Tickets.php

		public function save_checkin_details( $attendee_id, $qr ) {
			$checkin_details = [
				'date'   => current_time( 'mysql' ),
				'source' => ! empty( $qr ) ? 'app' : 'site',
				'author' => get_current_user_id(),
			];

			if ( ! empty( $qr ) ) {
				// Save the latest date in which a ticket was scanned with the APP.
				tribe_update_option( 'tec_tickets_plus_app_last_checkin_time', time() );

				// Save the attendee scan count.
				$attendee_scan_count = (int) tribe_get_option( 'tec_tickets_plus_app_attendees_checked_in' );
				tribe_update_option( 'tec_tickets_plus_app_attendees_checked_in', ++$attendee_scan_count );
			}

			/**
			 * Filters the checkin details for this attendee checkin.
			 *
			 * @since 5.5.2
			 *
			 * @param array $checkin_details The check-in details.
			 * @param int   $attendee_id     The ID of the attendee that's being checked-in.
			 * @param mixed $qr              True if the check-in is from a QR code.
			 */
			$checkin_details = apply_filters( 'tec_tickets_checkin_details', $checkin_details, $attendee_id, $qr );

			update_post_meta( $attendee_id, $this->checkin_key . '_details', $checkin_details );
		}

Top ↑

Changelog

Changelog
Version Description
5.5.2
5.5.11 Introduced.