Tribe__Tickets__Editor__Blocks__Tickets::get_is_sale_past( array $tickets )
Get whether all ticket sales have passed or not
Contents
Parameters
- $tickets
-
(array) (Required) Array of all tickets.
Return
(bool)
Source
File: src/Tribe/Editor/Blocks/Tickets.php
public function get_is_sale_past( $tickets ) {
$is_sale_past = ! empty( $tickets );
foreach ( $tickets as $ticket ) {
$is_sale_past = ( $is_sale_past && $ticket->date_is_later() );
}
return $is_sale_past;
}
Changelog
| Version | Description |
|---|---|
| 4.9 | Introduced. |