Remove License Activation Notifications
Sometimes developers place annoying notifications in the WordPress dashboard to add the licence key; in order to receive automatic updates, upgrades to other plugins or support.
These notifications can be ignored since they don’t affect the normal functionality of the plugin. However, sometimes it can be irritating.
Let’s see how you can remove these notifications from your WordPress dashboard.
You can use this code snippet in your child theme’s functions.php file.
add_action('admin_head', 'my_custom_notification');
function my_custom_notification() {
echo '<style>
.update-nag, div#message.notice,.notice-error, .notice-warning, .error {
display: none;
}
</style>';
}
The above code snippet will hide all those annoying notifications from your website. In case you want to individually hide each notification we can achieve that with the following plugin.
Using Plugin to Hide Notices individually
If you don’t want to use the code snippet to hide the annoying license activation notices or would like to hide notices individually.
Disable Admin Notices plugin is the perfect choice in that case. It’s a free and very popular plugin in the WordPress repository with more than 100k active installations.
The Hide admin notices plugin adds the “Hide notification forever” link for each admin notice. Click this link and the plugin will filter this notice and you will never see it. This method will help you to disable only annoying notices from plugins and themes, but important error notifications will continue to work.