Fatal error: Call to undefined function is_plugin_active() | WordPress

There are some threads on the internet telling you to do this as a fix:


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

That solution didn’t do anything for me, all I had to do was include plugin.php on my file like this:


include_once('wp-admin/includes/plugin.php');

And the error was gone. Hope this helps!

Leave a Reply