From f598b8341feb7a7dc1b9c6aeba896e6b60bcfc1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Jake=C5=A1?= Date: Tue, 24 Feb 2026 09:32:56 +0100 Subject: [PATCH] Use the new SQLite driver loader file when available The new SQLite driver now exposes wp-pdo-mysql-on-sqlite.php as a single entry point. Use it when present, falling back to the manual requires for older versions. --- src/SQLiteDatabaseIntegrationLoader.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/SQLiteDatabaseIntegrationLoader.php b/src/SQLiteDatabaseIntegrationLoader.php index 8f72197..30cda4a 100644 --- a/src/SQLiteDatabaseIntegrationLoader.php +++ b/src/SQLiteDatabaseIntegrationLoader.php @@ -88,7 +88,9 @@ public static function load_plugin() { $new_driver_enabled = defined( 'WP_SQLITE_AST_DRIVER' ) && WP_SQLITE_AST_DRIVER; - if ( $new_driver_enabled ) { + if ( $new_driver_enabled && file_exists( $plugin_directory . '/wp-pdo-mysql-on-sqlite.php' ) ) { + require_once $plugin_directory . '/wp-pdo-mysql-on-sqlite.php'; + } elseif ( $new_driver_enabled ) { require_once $plugin_directory . '/version.php'; require_once $plugin_directory . '/wp-includes/parser/class-wp-parser-grammar.php'; require_once $plugin_directory . '/wp-includes/parser/class-wp-parser.php';