How to get current logged in user using WordPress Rest Api?
Hello guys, how are you? Welcome back on blog therichpost.com. To obtain information about the current logged-in user through the WordPress REST API, please follow the below logic guys. $user_id = ""; //<- add this add_action( 'rest_api_init', 'add_custom_users_api'); function add_custom_users_api(){ $GLOBALS = get_current_user_id(); //<- add this // route url: domain.com/wp-json/mmw/v1/testing...
Recent Comments