is_super_admin() call produces fatal error in wordpress

Solution:1

I believe that this is a bug inĀ WordPress. To resolve, try the following within your plugin / theme:

require_once(realpath(dirname(__FILE__) . '/../../../')."/wp-includes/pluggable.php");

Solution:2

The better answer is to wrap whatever thing you’re doing in a function, and hook it onto the plugins_loaded or init hook. (see the wp-settings.php file)

Example:

add_action(‘init’,’do_stuff’);
function do_stuff(){
if (is_super_admin()) {
//do stuff
}
}