Tribe__Tickets__Main::maybe_set_options_for_old_installs()
Allows us to set options based on installed version.
Also a good place for things that need to be changed or set if they are missing (like meta keys).
Source
File: src/Tribe/Main.php
public function maybe_set_options_for_old_installs() {
/** @var \Tribe__Tickets__Attendee_Registration__Main $ar_reg */
$ar_reg = tribe( 'tickets.attendee_registration' );
// If the (boolean) option is not set, and this install predated the modal, let's set the option to false.
$modal_option = $ar_reg->is_modal_enabled();
if ( ! $modal_option && $modal_option !== false ) {
$modal_version_check = tribe_installed_before( Tribe__Tickets__Main::instance(), '4.11.0' );
if ( $modal_version_check ) {
/** @var $settings_manager Tribe__Settings_Manager */
$settings_manager = tribe( 'settings.manager' );
$settings_manager::set_option( 'ticket-attendee-modal', false );
}
}
}
Changelog
| Version | Description |
|---|---|
| 4.11.0 | Introduced. |