Hooks::filter_tickets_editor_config( TECTicketsCommercearray $data )
Filters the data used to render the Tickets Block Editor control.
Contents
Parameters
- $data
-
(<span class="TECTicketsCommercearray">TECTicketsCommercearray) (Required) The data used to render the Tickets Block Editor control.
Return
(TECTicketsCommercearray<string,mixed>) The data used to render the Tickets Block Editor control.
Source
File: src/Tickets/Commerce/Hooks.php
public function filter_tickets_editor_config( $data ) {
if ( ! isset( $data['tickets'] ) ) {
$data['tickets'] = [];
}
if ( ! isset( $data['tickets']['commerce'] ) ) {
$data['tickets']['commerce'] = [];
}
$data['tickets']['commerce']['isFreeTicketAllowed'] = tec_tickets_commerce_is_free_ticket_allowed();
return $data;
}
Changelog
| Version | Description |
|---|---|
| 5.10.0 | Introduced. |