你好,我是WordPress和PHP的新手,我正在尝试在插件的一个函数中删除用户。
wp_delete_user( $user->ID );
一切都运行良好,但当我尝试使用wp_delete_user时,我遇到了以下错误:
Call to undefined function wp_delete_user() in /homepages/6/d480314532/htdocs/wsb7416187601/zisteau_web/wp-content/plugins/patreon-wordpress-master/classes/patreon_wordpress.php on line 135
这个函数位于wp-includes/user.php中。有没有办法将这个功能导入并在那里使用?
谢谢。