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.php
file where your code is running and then, it includespluggable.php
file 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 forms
setting is enabled.
So, you can useget_current_user_id
function only at least afterplugins_loaded
action.
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.