wordpress plugin -> Call to undefined function wp_get_current_user()

后端 未结 9 1857
忘掉有多难
忘掉有多难 2020-12-01 07:58

I\'m trying to get the current user info in my plugin using the func wp_get_current_user(). But am getting Call to undefined function wp_get_current_user()

9条回答
  •  情歌与酒
    2020-12-01 08:17

    my issue solved with this code please

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

提交回复
热议问题