Quantcast
Channel: Betheme Support Forum
Viewing all articles
Browse latest Browse all 93345

How to hide TGM notifications ?

$
0
0
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

Viewing all articles
Browse latest Browse all 93345

Trending Articles