Fatal Error in wp_get_current_user() Function
You call this function too early, before pluggable function is_user_logged_in() is defined. Try this: function wpse_get_current_user() { $current_user = wp_get_current_user(); // do other stuff here } add_action( ‘init’, ‘wpse_get_current_user’, 10 );