Photo by Nagara Oyodo via Unsplash

Hiding UpdraftPlus nagging screens after your subscription ran out

Nagscreens. You know them. Very annoying. Long story short: I recently stopped updating my subscription to a paid WordPress plugin and it started using nag screens to guilt me into renewing the subscription again. In this specific case we have the UpdraftPlus plugin that I really suggest everyone to use, but it did not really add new features or did anything else to make me feel like having a yearly subscription for the simple backup plugin would be something I want to do.

I did not renew it and disabled the nag screens the following ways:

Hide license expiration notifications in the WordPress dashboard - because, well, you know they are expired:

Add the following custom CSS function to your functions.php.

 1// dnb 2020-09-18
 2// hide updraft plus notices about expired licenses
 3function dnb_remote_updraft_license_notifications() {
 4  echo '<style>
 5.updraftupdatesnotice-updatesexpired,
 6.updraftupdatesnotice-updatesexpiringsoon {
 7display: none !important;
 8}
 9</style>';
10}
11add_action('admin_head', 'dnb_remote_updraft_license_notifications');

This solution is only half-baked, because it does not fully disable these notifications. It just hides them. But it works.

Hide plugin update notifications that would result in failed update attempts (because you have no license):

Add the following to your functions.php

1// dnb 2020-09-18
2// hide update notifications for non-updatable plugins
3function dnb_remove_updraft_update_notifications($value){
4    if (isset($value) && is_object($value)){
5        unset($value->response['updraftplus/updraftplus.php']);
6    }
7    return $value;
8}
9add_filter('site_transient_update_plugins', 'dnb_remove_updraft_update_notifications');

This will hide updates for the plugin.

The one pain-point I need to figure out is how to check if a legit update is available, like the one recently when a security issue was discovered. In those cases most of the yearly-subscription-based plugins will offer an update to users with expired subscriptions too. This specific update will be hidden by the last addition to your functions.php. I keep an eye on these issues and comment the add_filter method in the last line out to receive a working update notification, then update, then uncomment the line again.