Tribe__Tickets__Commerce__PayPal__Order::add_attendee( int $attendee_id )

Adds an attendee to those related to the Order.


Parameters

$attendee_id

(int) (Required) An attendee post ID.


Top ↑

Source

File: src/Tribe/Commerce/PayPal/Order.php

	public function add_attendee( $attendee_id ) {
		/** @var Tribe__Tickets__Commerce__PayPal__Main $paypal */
		$paypal = tribe( 'tickets.commerce.paypal' );

		$attendee = $paypal->get_attendee( $attendee_id );

		if ( $this->has_attendee( $attendee_id ) ) {
			$this->remove_attendee( $attendee_id );
		}

		$this->attendees[] = $attendee;
	}