Tribe__Dependency::has_active_premium_plugin()

Return if we have a premium plugin active.

Results may be unreliable if called before the tribe_plugins_loaded hook.


Return

(bool)


Top ↑

Source

File: src/Tribe/Dependency.php

		public function has_active_premium_plugin(): bool {
			$active_plugins = $this->get_active_plugins();
			foreach ( $active_plugins as $plugin ) {
				if (
					'Tribe__Events__Main' !== $plugin['class']
					&& 'Tribe__Tickets__Main' !== $plugin['class']
					&& ! $this->is_extension( $plugin['class'] ) // ensure extensions don't trigger the "premium" flag.
				) {
					return true;
				}
			}

			return false;
		}

Top ↑

Changelog

Changelog
Version Description
5.1.3 Introduced.