2 votes

wp_logout action hook is not firing

In your code, get_current_user_id() will return 0 because this hook fires after the logout has happened, ie, there is no current user ID. If you want the $user_id to be available to your function, you ...
Pat J's user avatar
  • 11.3k

Only top scored, non community-wiki answers of a minimum length are eligible