make(ActivationHandler::class))->handle($network_wide); }); register_deactivation_hook($file, function () use ($app) { ($app->make(DeactivationHandler::class))->handle(); }); require_once(FLUENT_BOOKING_DIR . 'boot/action_scheduler_loader.php'); add_action('plugins_loaded', function () use ($app) { do_action('fluent_booking/loaded', $app); $currentDBVersion = get_option('fluent_booking_db_version'); if (!$currentDBVersion || version_compare($currentDBVersion, FLUENT_BOOKING_DB_VERSION, '<')) { // plugins_loaded, so every request during an upgrade reaches this. if (!get_transient('fluent_booking_db_migration_lock')) { set_transient('fluent_booking_db_migration_lock', 1, 5 * MINUTE_IN_SECONDS); DBMigrator::run(); // Stamped after the run: a failure mid-migration used to leave // the version current against a schema that never changed. update_option('fluent_booking_db_version', FLUENT_BOOKING_DB_VERSION, 'no'); delete_transient('fluent_booking_db_migration_lock'); } } if (defined('FLUENT_BOOKING_PRO_VERSION') && version_compare(FLUENT_BOOKING_MIN_PRO_VERSION, FLUENT_BOOKING_PRO_VERSION, '>')) { if (!current_user_can('manage_options')) { return; } add_filter('fluent_booking/dashboard_notices', function ($notices) { $updateUrl = admin_url('plugins.php?s=fluent-booking&plugin_status=all&fluent-booking-pro-check-update=' . time()); $notices[] = '