Handle unavailable PHP function get_current_user()
-
Hello.
Sometimes the PHP function
get_current_user()
may not be available (mostly disabled, hence unavailable, e.g. on Kinsta hosting), and while activating the plugin, the code throws an exception that is not visible to the user.It would be good to check first if
get_current_user()
is available and displays the error message instead of silently throwing the exception and blocking the whole WordPress. To resolve it, the user must manually remove the plugin from the server, which may not always be possible.Hope this helps to improve the user experience.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Handle unavailable PHP function get_current_user()’ is closed to new replies.