Tribe__Tickets__Editor__Blocks__Tickets::set_messages()

Localized messages for errors, etc in javascript. Added in assets() above.

Set up this way to amke it easier to add messages as needed.


Return

(void)


Top ↑

Source

File: src/Tribe/Editor/Blocks/Tickets.php

	public function set_messages() {
		$messages = [
			'api_error_title'        => _x( 'API Error', 'Error message title, will be followed by the error code.', 'event-tickets' ),
			'connection_error'       => __( 'Refresh this page or wait a few minutes before trying again. If this happens repeatedly, please contact the Site Admin.', 'event-tickets' ),
			'capacity_error'         => __( 'The ticket for this event has sold out and has been removed from your cart.', 'event-tickets'),
			'validation_error_title' => __( 'Whoops!', 'event-tickets' ),
			'validation_error'       => '<p>' . sprintf( _x( 'You have %s ticket(s) with a field that requires information.', 'The %s will change based on the error produced.', 'event-tickets' ), '<span class="tribe-tickets__notice--error__count">0</span>' ) . '</p>',
		];

		return $messages;
	}

Top ↑

Changelog

Changelog
Version Description
4.11.0 Introduced.