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) :
Any idea on how to hide these notifications ?
Thanks in advance for your help
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.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);
}
Any idea on how to hide these notifications ?
Thanks in advance for your help
Comments
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!
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
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.