Tribe__Tickets__Tickets::hook()

Most Commerce Providers needs this to be setup later than when the actual class is actually loaded

For Frontend Hooks, admin ones need to be loaded earlier


Return

(void)


Top ↑

Source

File: src/Tribe/Tickets.php

		public function hook() {
			// Front end
			$ticket_form_hook = $this->get_ticket_form_hook();

			if ( ! empty( $ticket_form_hook ) ) {
				add_action( $ticket_form_hook, array( $this, 'maybe_add_front_end_tickets_form' ), 5 );
				add_filter( $ticket_form_hook, array( $this, 'show_tickets_unavailable_message' ), 6 );
			}

			add_filter( 'the_content', array( $this, 'front_end_tickets_form_in_content' ), 11 );
			add_filter( 'the_content', array( $this, 'show_tickets_unavailable_message_in_content' ), 12 );
			/**
			 * Trigger an action every time a new ticket instance has been created
			 *
			 * @since 4.9
			 *
			 * @param Tribe__Tickets__Tickets $ticket_handler
			 */
			do_action( 'tribe_tickets_tickets_hook', $this );
		}

Top ↑

Changelog

Changelog
Version Description
4.7.5 Introduced.