Tribe__Tickets__Tickets_View::get_description_rsvp_ticket( int $event_id, int|null $user_id = null, null $deprecated = null )

Gets the name(s) of the type(s) of ticket(s) the specified user (optional) has for the specified event.


Parameters

$event_id

(int) (Required) The Event ID we're checking.

$user_id

(int|null) (Optional) An optional User ID.

Default value: null

$deprecated

(null) (Optional) Deprecated argument.

Default value: null


Top ↑

Return

(string)


Top ↑

Source

File: src/Tribe/Tickets_View.php

	public function get_description_rsvp_ticket( $event_id, $user_id = null, $plurals = false ) {
		$what_to_update = array();

		if ( $this->has_rsvp_attendees( $event_id, $user_id ) ) {
			$what_to_update[] = $plurals ? esc_html__( 'RSVPs', 'event-tickets' ) : esc_html__( 'RSVP', 'event-tickets' );
		}

		if ( $this->has_ticket_attendees( $event_id, $user_id ) ) {
			$what_to_update[] = $plurals ? esc_html__( 'Tickets', 'event-tickets' ) : esc_html__( 'Ticket', 'event-tickets' );
		}

		// Just Return false if array is empty
		if ( empty( $what_to_update ) ) {
			return false;
		}

		return implode( esc_html__( ' and ', 'event-tickets' ), $what_to_update );
	}

Top ↑

Changelog

Changelog
Version Description
4.2
4.10.8 Introduced.