| @@ -45,12 +45,9 @@ | ||
| 45 | 45 | } |
| 46 | 46 | if ( ! function_exists( 'activate_plugin' ) ) { |
| 47 | 47 | require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 48 | 48 | } |
| 49 | - | |
| 50 | - $plugin_path = WP_PLUGIN_DIR . '/' . '{SQLITE_PLUGIN}'; | |
| 51 | - | |
| 52 | - if ( file_exists( $plugin_path ) && is_plugin_inactive( '{SQLITE_PLUGIN}' ) ) { | |
| 49 | + if ( is_plugin_inactive( '{SQLITE_PLUGIN}' ) ) { | |
| 53 | 50 | // If `activate_plugin()` returns a value other than null (like WP_Error), |
| 54 | 51 | // the plugin could not be found. Try with a hardcoded string, |
| 55 | 52 | // because that probably means the file was directly copy-pasted. |
| 56 | 53 | if ( null !== activate_plugin( '{SQLITE_PLUGIN}', '', false, true ) ) { |