Tribe__Tickets_Plus__Meta::meta_has_required_fields( int $ticket_id )

Checks if a ticket has required meta.


Parameters

$ticket_id

(int) (Required) The ticket ID.


Top ↑

Return

(bool) Whether the ticket has required meta.


Top ↑

Source

File: src/Tribe/Meta.php

	public function meta_has_required_fields( $ticket_id ) {
 		// Get the meta fields for this ticket
		$ticket_meta = $this->get_meta_fields_by_ticket( $ticket_id );
 		foreach ( $ticket_meta as $meta ) {
			if ( 'on' === $meta->required ) {
				return true;
			}
		}
 		return false;
	}

Top ↑

Changelog

Changelog
Version Description
4.9 Introduced.