Current user in plugin returns NULL
I am currently developing a plugin and I am trying to make use of the $current_user global. class Something { public function __construct() { $this->get_user(); var_dump( $this->user ); } private function get_user() { require_once( ABSPATH . ‘/wp-includes/pluggable.php’ ); $this->user = wp_get_current_user(); } } This actually works. However, I need to call pluggable.php file which shouldn’t … Read more