If there's no external update to display, remove any cached update info WordPress might have about the plugin.
If there's no external update to display, remove any cached update info WordPress might have about the plugin.

This is a significant change from previous behaviour where the library would leave the value of the "update_transients" unmodified if there were no updates available. That worked fine at the time because WP wouldn't re-save the injected update to the DB. So when no updates were available, old cached updates wouldn't show up either. However, this appears to have changed - in some cases, the injected update sticks around even if the plugin is no longer injecting it. This patch counters that.

Drawback: If you use this library in a plugin that's hosted on wordpress.org, it will overwrite any update data from wordpress.org with its own and effectively disable wordpress.org updates for your plugin (doesn't affect other plugins).

YahnisElsts/plugin-update-checker,YahnisElsts/plugin-update-checker,adigital/plugin-update-checker,adigital/plugin-update-checker