2
votes

I'm developing my own Wordpress plugins & widgets and after I load some of them Wordpress displays message next to them saying:

There is a new version of [my plugin name] available. View version [version number] Details or upgrade automatically.

What the hell? :)

I always set Plugin and Author URIs in plugin .php file along with autor's name and plugin's version.

At this moment I'm pretty sure there's a Wordpress mechanism based on plugin name, and if finds plugin with similar name - it thinks that's the right one.

The funny thing is even renaming isn't helpful in many cases. Example? I've been working on plugin based on Google Maps. So I've decided to name it "Google Maps". Wordpress wants to update my plugin. So I'm renaming it. "[fomicz] Google Maps". Still the same. "Fomicz Google Maps Plugin". Nothing. "Mystupidplugin Google Maps Please Stop Asking For Updates". STILL shows "new version" message!

What to do? I don't want to disable update option, because I'm pretty sure I'll be updating my plugins in the future.

Thanks!

1
Wordpress determines what a plugin is by parsing the plugin name in the comment block header of the plugin file (wp-admin/includes/plugin.php function name get_plugin_data if you're interested). Changing it should definitely stop the update offers...Paul Kehrer

1 Answers

3
votes

As already mentioned in the comments, WordPress retrieves the plug-in name from the comment block header in the main plug-in file (using the function get_plugin_data defined in /wp-admin/includes/plugin.php).

The thing is, it doesn't look for updates every time you visit the page - it schedules a chron job that fires every few hours to ease load on the servers running the repository. So after it finds an update for a plug-in, it will cache that find.

My recommendation:

  1. Deactivate and delete your plug-in from the site.
  2. Re-name the plug-in in the code.
  3. Re-add your re-named plug-in to your site

This should circumvent any caching done by the update system.