tribe_tickets_plus_meta_field_id( int $ticket_id, string $field_slug, string $option_slug = '', string|null $attendee_id = null )

Build the AR field id.


Parameters #

$ticket_id

(int) (Required) The ticket ID.

$field_slug

(string) (Required) The field slug.

$option_slug

(string) (Optional) The field option slug (in case they need it).

Default value: ''

$attendee_id

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

Default value: null


Top ↑

Return #

(string) The AR field id.


Top ↑

Source #

File: src/functions/template-tags.php

	function tribe_tickets_plus_meta_field_id( $ticket_id, $field_slug, $option_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_id = "tribe-tickets_{$ticket_id}_{$field_slug}_{$attendee_id}";

		if ( ! empty( $option_slug ) ) {
			$field_id .= "_{$option_slug}";
		}

		return $field_id;
	}