Provider

Class Provider.


Source

File: src/Tickets_Plus/Flexible_Tickets/Provider.php

class Provider extends Controller {

	/**
	 * Registers the bindings, service providers and controllers part of the feature.
	 *
	 * @since 5.9.0
	 *
	 * @return void
	 */
	protected function do_register(): void {
		$series_are_ticketable = in_array(
			Series::POSTTYPE,
			(array) tribe_get_option( 'ticket-enabled-post-types', [] ),
			true
		);

		if ( $series_are_ticketable ) {
			$this->container->register( Series_Passes::class );
		}

		$this->container->register( WooCommerce::class );
	}

	/**
	 * Unregisters the bindings, service providers and controllers part of the feature.
	 *
	 * @since 5.9.0
	 *
	 * @return void
	 */
	public function unregister(): void {
		$this->container->get( Series_Passes::class )->unregister();
		$this->container->get( WooCommerce::class )->unregister();
	}
}

Top ↑

Changelog

Changelog
Version Description
5.9.0 Introduced.

Top ↑

Methods

  • unregister — Unregisters the bindings, service providers and controllers part of the feature.