How to get userid at wp_logout action hook?

Question

I need to perform some cleanup after a user logged out, so I added a wp_logout action hook. Problem is, wp_get_current_user() already returns null if called from within the wp_logout action hook. How do I get the logging out users userid inside a wp_logout action hook?

0
Davos Seaworth 3 years 2020-08-21T06:10:29-05:00 0 Answers 56 views 0

Leave an answer

Browse
Browse