You mean the upgrade is for the wrong plugin?
The upgrade link “was” wrong for the plugin. It was an honest mistake that Tom will explain later.
All netpup ever does is come to these forums and attack WP e-commerce I would not be surprised if he has something to do with a certain compeating plugin!! Get a life and rather than just being negative why don’t you go promote your own stuff. What a bozo! (you gotta love bbpress terminology).
Over to you Tom…
Ciao,
Dan
We did have the URL incorrect in the plugins, we just set it to instinct.co.nz. Seems that is what the update code looks for to determine which plugin to update to what.
I thought I had already updated the other plugins to use different URLs, seems the versions on the instinct site are not, they should be updated by the end of the day. However, WordPress has an annoying way of caching such things.
Thanks for the comment Gamerz. I’ve always respected and used your plugins, it is nice to be communicating with another WordPress old timer about something real as opposed to defending WP e-Commerce against trolls ;P
So anyway we worked with the WordPress Testers team and figured out how to disable auto updates – at least until WordPress build a hook that lets plugin developers specify directories that are not allowed to be deleted by an auto update. That said I think WordPress 2.6 will tackle this differently in the sense that you will be able to move certain directories anywhere you like. You may already know this though.
Anyway the code provided by the testers was this:
add_filter('option_update_plugins', 'plugin_no_upgrade');
function plugin_no_upgrade($option){
$this_plugin = plugin_basename(__FILE__); //eg: 'nextgen-gallery/nggallery.php'
if( isset($option->response[ $this_plugin ]) ){
//Clear its download link:
$option->response[ $this_plugin ]->package = '';
}
return $option;
}
The plugins page (While the plugin is activated) Will show this:
“There is a new version of NextGEN Gallery available. Download version 0.96 here <i>automatic upgrade unavailable for this plugin</i>.”
Most smaller plugins will never need to know about this stuff. But when you start giving people the ability to customize things then this stuff suddenly becomes very important 😛
Ciao,
Dan
@mufasa Thanks for the kind compliments =D Yea I feel you on the support side. Users don’t read and they don’t search. Once they have problems some will yell at you but some will tell you nicely. Some will demand you that they need it asap some will be reasonable.
Thanks for sharing the code =D Learnt something new lol