I had a website which wasn’t updated for a long time. Suddenly, few days ago, my website stopped working and found this error line in error_log
file.
[18-Mar-2014 19:16:43 UTC] PHP Fatal error: Call to undefined function wp_get_current_user() in /home8/****/public_html/wp-includes/capabilities.php on line 1289
I have tried everything I know and almost every claims found online. What could be the possible reason and solution for this outage?
Solution is include the pluggable file in your plguin file. After include this file easily resolve your problem.
require_once( ABSPATH . ‘/wp-includes/pluggable.php’ );
$user_info = wp_get_current_user();
As seen at https://codex.wordpress.org/Function_Reference/wp_get_current_user
Do you have this file included?
(sorry if this is an stupid question, I don’t know about wordpress)