在重构/重构插件中的文件后,我现在得到了错误
未捕获错误:调用未定义的函数get\\u userdata()
后代码
$current_user_id = get_current_user_id();
$current_user_meta = get_userdata($current_user_id);
在中mydomain.local/wp-content/plugins/my-project/my-project.php
我也像以前一样尝试了另一种方法。php文件required
通过my-project.php
这些行很早就出现在我的插件代码中了。。。在运行它们之前,我是否缺少一些依赖关系?