How to hide TGM notifications ?

Hi !

I just updated to version 10.6, and I have an issue with TGM notifications.
"Sorry, but you do not have the correct permissions to install the...."

Before the update (in version 10.1), i managed to hide TGM notifications with this code (in function.php - childtheme) :

if(!current_user_can('update_core')) {
    add_filter('get_user_metadata', function($val, $object_id, $meta_key, $single)
    {
        if($meta_key === 'tgmpa_dismissed_notice')
            return true;
        else
            return null;
    }, 10, 4);
}

But this isn't working anymore in 10.6 version.

Any idea on how to hide these notifications ?
Thanks in advance for your help

Comments

  • Hi,

    TGM class has been updated few weeks ago so if you are sure that you made update properly, you supposed to deactivate plugins and all other extra stuff. Otherwise, please re-install theme once again but this time thru FTP.

    Thanks!
  • Yes I updated the entire theme folder (by FTP).
    But I don't understand the part of deactivating plugins and all other stuff

    The only packaged plugin from theme I use is : WPBakery Visual Composer (v.4.8.1)
    What other stuff are you talking about ?

    Thanks for your time


  • We don't know what plugins you use exactly so we just informed you that extra plugins and other stuff may be the reason because we use TGM plugin on hundreds of sites and everything is fine. This means that problem is somewhere else. Also, please notice that we do not offer files customization and if you did something wrong in child theme, this may be also the reason why it does not work properly. We recommend to remove child theme and try parent theme instead because TGM works on 100%.
  • Thanks for your answer !
    I think you misunderstood me, the TGM plugin is working fine, I just want to automatically hide notifications box for non-admin users.
    But that's ok, i used the "dismiss this notice" link for all my wp users accounts.



  • Sorry, we misunderstood. However, we do not have any solution to hide this notifications box for the non-admin users unfortunately.
Sign In or Register to comment.