Tribe__Tickets_Plus__Main::maybe_set_event_tickets_plus_version()

Set the Event Tickets version in the options table if it’s not already set.


Source #

File: src/Tribe/Main.php

		public function maybe_set_event_tickets_plus_version() {
			if ( version_compare( Tribe__Settings_Manager::get_option( $this->latest_version_slug ), self::VERSION, '<' ) ) {
				$previous_versions   = Tribe__Settings_Manager::get_option( $this->version_history_slug ) ?: [];
				$previous_versions[] = Tribe__Settings_Manager::get_option( $this->latest_version_slug ) ?: '0';

				Tribe__Settings_Manager::set_option( $this->version_history_slug, $previous_versions );
				Tribe__Settings_Manager::set_option( $this->latest_version_slug, self::VERSION );
			}
		}

Top ↑

Changelog #

Changelog
Version Description
4.11.0 Introduced.