Hooks::filter_tickets_editor_config( TECTicketsCommercearray $data )

Filters the data used to render the Tickets Block Editor control.


Parameters

$data

(<span class="TECTicketsCommercearray">TECTicketsCommercearray) (Required) The data used to render the Tickets Block Editor control.


Top ↑

Return

(TECTicketsCommercearray<string,mixed>) The data used to render the Tickets Block Editor control.


Top ↑

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;
	}

Top ↑

Changelog

Changelog
Version Description
5.10.0 Introduced.