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.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.