Tribe__Tickets_Plus__Meta::meta_has_required_fields( int $ticket_id )
Checks if a ticket has required meta.
Contents
Parameters
- $ticket_id
-
(int) (Required) The ticket ID.
Return
(bool) Whether the ticket has required meta.
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;
}
Changelog
| Version | Description |
|---|---|
| 4.9 | Introduced. |