Wrong using get_current_user_id function
-
In your plugin, you try to get get_current_user_id() earlier than it’s possible. https://i.imgur.com/4xnQC26.png It’s always 0 in this place. You can check
wp-settings.phpfile where your code is running and then, it includespluggable.phpfile where defining get_current_user_id function https://i.imgur.com/Q3zEw0S.png
That’s why your plugin has a lot of issues with other plugins in Admin area ifCustom contact formssetting is enabled.
So, you can useget_current_user_idfunction only at least afterplugins_loadedaction.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Wrong using get_current_user_id function’ is closed to new replies.