Support » Plugin: Google Analyticator » Deprecated function warnings since WP 4.5

  • Resolved chesio



    In WordPress 4.5, function get_currentuserinfo has been deprecated. As this plugin declares compatibility up to 4.7.2, it would be perfect, if this problem (that has been already reported before) could be finally solved:

    In google-analyticator.php, replace lines 1288-1289:

    global $current_user;

    With a single line:

    $current_user = wp_get_current_user();

    Function wp_get_current_user is available since WP 2.0.3, so there’s no need to bump up required WP version.

    Thanks and cheers,

Viewing 6 replies - 1 through 6 (of 6 total)
  • hi,
    love the plugin. i had to enable wp_debug on my site in order to debug a separate issue and my debug log is littered with the error/warning mentioned above.

    i know it isn’t causing an issue on my site, but just wanted to tag onto chesio’s post, and maybe see if you all had plans to update the code to use the new function.

    thanks so much and have a great weekend

    The deprecated plugin is referenced on line 1289 of module


    Hopefully the author will supply a correction to this in the next update.

    the change to be applied is:

    @@ -1286,7 +1286,7 @@ function ga_current_user_is($roles)
    if ( !$roles ) return false;

    global $current_user;
    – get_currentuserinfo();
    + wp_get_current_user();
    $user_id = intval( $current_user->ID );

    if ( !$user_id ) {


    Plugin Author grimmdude



    Thanks for your message. This has been fixed in 6.5.3.


    I have this error message (google analyticator plugin) even after updating. Help me to solve the issue
    “Notice: load_plugin_textdomain was called with an argument that is deprecated since version 2.7.0 with no alternative available”

    Hi @akanksha404,

    You should probably create your own thread for this to get plugin author’s attention. Despite the notice message is similar, it’s a different problem and this one has been resolved.


    • This reply was modified 1 year, 2 months ago by  chesio. Reason: fix typo

    Ok, nevermind, I just noticed that you already did… 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Deprecated function warnings since WP 4.5’ is closed to new replies.