Page::tickets_exist()
Whether or not tickets exist to be displayed.
Return
(bool)
Source
File: src/Tickets/Admin/Tickets/Page.php
public static function tickets_exist() {
$post_types = static::get_ticket_post_types();
if ( empty( $post_types ) ) {
return false;
}
/** @var Tribe__Repository $repository */
$repository = tribe_tickets()->by_args(
[
'post_type' => static::get_ticket_post_types(),
]
);
return $repository->found() > 0;
}
Changelog
| Version | Description |
|---|---|
| 5.14.0 | Introduced. |