Much appreciated for the heads up! I updated my files (PgCacheAdminEnvironment.php and SupportActionsAdmin.php)
Hi , I have the same problem, updated to 0.9.4.1 on WP 4.5 but I still get the warning.
What should I do?
Thanks
Daniel
I have the same errormessage
Version 0.9.4.1
WP 4.5.1–sv_SE
I shows up on plugins page (admin panel)
Seeing the same thing on our site… Notice: get_currentuserinfo is deprecated since version 4.5! Use wp_get_current_user() instead. in XXXX/wp-includes/functions.php on line 3658
Thread Starter
tizz
(@tizz)
This plugin gives me the impression of being abandoned.
I know that that note makes no harm, but I don’t understand why it’s not fixed since just a simple replacement of get_currentuserinfo() with wp_get_current_user() is needed.
I have the same problem. Fix please.
@vee, thanks for sharing 🙂
@tizz
The plugin isn’t abandoned. Michael Torbit answered one of my questions not too long ago. My guess is they are doing this voluntarily, so if you can, be patient with them.
This might help.
get_currentuserinfo()
can be replaced with
if(function_exists('wp_get_current_user')) {
$current_user = wp_get_current_user();
} else if(function_exists('get_currentuserinfo')) {
$current_user = get_currentuserinfo();
}
or
if(function_exists('wp_get_current_user')) {
wp_get_current_user();
} else if(function_exists('get_currentuserinfo')) {
get_currentuserinfo();
}
Choose depending on how get_currentuserinfo() is being called in the file your trying to replace in. You will need to do your own testing for your replacements. This is what I found in another plugin, so, not my code. Just passing along. Seems to gracefully degrade too, which may be handy for those themes/plugins on WP below 4.5.
HTH,
Best,
Karl
Just fyi. I placed this code..
if(function_exists('wp_get_current_user')) {
$current_user = wp_get_current_user();
} else if(function_exists('get_currentuserinfo')) {
$current_user = get_currentuserinfo();
}
..inside PgCacheAdminEnvironment.php where it was saying..
$current_user = get_currentuserinfo();
..was being called per DebugBar and the error message went away and W3TC still worked.. for me. Using WordPress 4.6
HTH,
Best,
Karl