Check get_plugin_data exists
This commit is contained in:
parent
4ea3049372
commit
4e8342be38
|
@ -801,6 +801,12 @@ class WC_REST_System_Status_V2_Controller extends WC_REST_Controller {
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function get_active_plugins() {
|
public function get_active_plugins() {
|
||||||
|
require_once ABSPATH . 'wp-admin/includes/plugin.php';
|
||||||
|
|
||||||
|
if ( ! function_exists( 'get_plugin_data' ) ) {
|
||||||
|
return array();
|
||||||
|
}
|
||||||
|
|
||||||
$active_plugins = (array) get_option( 'active_plugins', array() );
|
$active_plugins = (array) get_option( 'active_plugins', array() );
|
||||||
if ( is_multisite() ) {
|
if ( is_multisite() ) {
|
||||||
$network_activated_plugins = array_keys( get_site_option( 'active_sitewide_plugins', array() ) );
|
$network_activated_plugins = array_keys( get_site_option( 'active_sitewide_plugins', array() ) );
|
||||||
|
|
Loading…
Reference in New Issue