diff --git a/src/SQLiteDriverFactory.php b/src/SQLiteDriverFactory.php index 9cf3fb6..b8cd8ed 100644 --- a/src/SQLiteDriverFactory.php +++ b/src/SQLiteDriverFactory.php @@ -21,7 +21,12 @@ public static function create_driver() { 'path' => FQDB, ) ); - return new WP_SQLite_Driver( $connection, DB_NAME ); + if ( defined( 'DB_NAME' ) && '' !== DB_NAME ) { + $db_name = DB_NAME; + } else { + $db_name = 'database_name_here'; + } + return new WP_SQLite_Driver( $connection, $db_name ); } return new WP_SQLite_Translator();