• I’m using current_user_can() in theme file in WordPress 4.5 and it turns out to be error 500.

    error_log file says:

    [15-Apr-2016 16:39:53 UTC] PHP Fatal error:  Call to undefined function wp_get_current_user() in /.../wp-includes/capabilities.php on line 428

    adding this in wp-settings.php fixes it:

    require_once(ABSPATH . 'wp-includes/pluggable.php');

    What could be the issue?

  • The topic ‘current_user_can error 500 in WordPress 4.5’ is closed to new replies.