diff --git src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php
index 4eca50b549..c4155ad63d 100644
|
|
class WP_REST_Plugins_Controller extends WP_REST_Controller { |
209 | 209 | * @return true|WP_Error True if can read, a WP_Error instance otherwise. |
210 | 210 | */ |
211 | 211 | protected function check_read_permission( $plugin ) { |
| 212 | require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
| 213 | |
212 | 214 | if ( ! $this->is_plugin_installed( $plugin ) ) { |
213 | 215 | return new WP_Error( 'rest_plugin_not_found', __( 'Plugin not found.' ), array( 'status' => 404 ) ); |
214 | 216 | } |