tribe_tickets_plus_meta_field_name( int $ticket_id, string|null $field_slug, string|null $attendee_id = null )

Build the AR meta field name.


Parameters #

$ticket_id

(int) (Required) The ticket ID.

$field_slug

(string|null) (Required) The field slug.

$attendee_id

(string|null) (Optional) The attendee ID or null to default to dynamic ID.

Default value: null


Top ↑

Return #

(string) The AR field name.


Top ↑

Source #

File: src/functions/template-tags.php

	function tribe_tickets_plus_meta_field_name( $ticket_id, $field_slug, $attendee_id = null ) {
		// Get attendee ID to use, possibly using default dynamic ID.
		$attendee_id = tribe_tickets_plus_meta_field_get_attendee_id( $attendee_id );

		$field_name = 'tribe_tickets[' . $ticket_id . '][attendees][' . $attendee_id . '][meta]';

		if ( null === $field_slug ) {
			return $field_name;
		}

		return $field_name . '[' . $field_slug . ']';
	}