Tribe__Tickets_Plus__Commerce__EDD__Main::checkin( int $attendee_id, bool $qr = false, int|null $event_id = null )

Marks an attendee as checked in for an event

Because we must still support our legacy ticket plugins, we cannot change the abstract checkin() method’s signature. However, the QR checkin process needs to move forward so we get around that problem by leveraging func_get_arg() to pass a second argument.

It is hacky, but we’ll aim to resolve this issue when we end-of-life our legacy ticket plugins OR write around it in a future major release


Parameters

$attendee_id

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

$qr

(bool) (Optional) true if from QR checkin process (NOTE: this is a param-less parameter for backward compatibility)

Default value: false

$event_id

(int|null) (Optional) The ID of the ticket-able post the Attendee is being checked into.

Default value: null


Top ↑

Return

(bool) Whether the Attendee was checked in or not.


Top ↑

Source

File: src/Tribe/Commerce/EDD/Main.php

	public function checkin( $attendee_id, $qr = false ) {
		update_post_meta( $attendee_id, $this->checkin_key, 1 );

		if ( func_num_args() > 1 && $qr = func_get_arg( 1 ) ) {
			update_post_meta( $attendee_id, '_tribe_qr_status', 1 );
		}

		/**
		 * Fires a checkin action
		 *
		 * @deprecated 4.7 Use event_tickets_checkin instead
		 *
		 * @param int       $attendee_id
		 * @param bool|null $qr
		 */
		do_action( 'eddtickets_checkin', $attendee_id, $qr );

		return true;
	}

Top ↑

Changelog

Changelog
Version Description
5.9.2 Add the tec_tickets_attendee_checkin filter to override the checkin process.
3.1.2 Introduced.