Tribe__Tickets_Plus__Commerce__EDD__Main::include_your_tickets( EDDOrdersOrder $order )

Includes the “Your Tickets” template for the confirmation page.

This method initializes the Tribe__Template instance, fetches the attendees by the order ID, and then calls the appropriate template to render the Your Tickets section.


Parameters

$order

(EDDOrdersOrder) (Required) Current order.


Top ↑

Source

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

	public function include_your_tickets( $order ): void {
		// Bail if $order is not an instance of \EDD\Orders\Order.
		if ( ! $order instanceof \EDD\Orders\Order ) {
			return;
		}

		// Bail if the order ID is not valid.
		$order_id = $order->id;
		if ( empty( $order_id ) ) {
			return;
		}

		$attendees = $this->get_attendees_by_order_id( $order_id );

		// Bail if there are no attendees.
		if ( empty( $attendees ) ) {
			return;
		}

		$template_args = [
			'provider'      => $this,
			'provider_id'   => $this->class_name,
			'order'         => $order,
			'order_id'      => $order_id,
			'is_tec_active' => tec_tickets_tec_events_is_active(),
			'attendees'     => $attendees,
		];

		tribe( 'tickets.editor.template' )->template( 'components/attendees-list/attendees', $template_args, true );
	}

Top ↑

Changelog

Changelog
Version Description
5.8.0 Introduced.