true] ); } require_once $autoloader; // Check minimum requirements if (!\Yatra\Core\Requirements::check()) { return; } // Bootstrap the plugin try { if (!class_exists('Yatra\Bootstrap')) { throw new \Exception('Bootstrap class not found. Run composer install --no-dev --optimize-autoloader (or composer run install:prod) in the plugin directory.'); } $yatra = new \Yatra\Bootstrap(); $yatra->init(); } catch (Throwable $e) { // Use plain strings instead of translation functions to avoid early loading wp_die( sprintf( 'Yatra plugin failed to initialize: %s', esc_html($e->getMessage()) ), 'Yatra Plugin Error', ['back_link' => true] ); } register_activation_hook(YATRA_PLUGIN_FILE, static function (): void { if (!function_exists('yatra_normalize_yatra_plugins_active_order')) { require_once YATRA_PLUGIN_PATH . 'includes/incompatible-pro-guard.php'; } yatra_normalize_yatra_plugins_active_order(); yatra_deactivate_incompatible_old_pro(); });