is_plugin_active function doesn’t exist

That’s because the file in which is_plugin_active() is defined – wp-admin/includes/plugin.php – is only loaded in the admin, after your plugin is loaded.

Thus, you can only call it after ‘admin_init’ has fired:

function check_some_other_plugin() {
  if ( is_plugin_active('some-plugin.php') ) {
    ...
  }
}
add_action( 'admin_init', 'check_some_other_plugin' );

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)