How to add an inline plugin update message

I was inspired to find out how to add an inline plugin update message when I saw a recent update notification from WooCommerce. They have quite a fancy customized message that expands on the basic notification that a new version is available:

WordPress plugin update notice

By sheer concidence, I recently had a situation where I needed to advise users of a critical update to a plugin. I had assumed that the Upgrade Notice section in the readme file would take care of that automatically but it seems that’s no longer the case. So I took a look into how it’s possible to alert users to upgrade a plugin.

In my opinion, this code snippet is vital for any plugin because it appears that WordPress doesn’t currently offer a method for plugin authors to communicate with their users regarding essential updates. Read more