WP Updates Updater Code Changes

In case you had not noticed, back when we released our big update we changed the updater code and they way you download the wp-updates-plugin.php and wp-updates-theme.php for themes and plugins. This had no affect on plugins and themes using the old code, but improved the code going forward.

The wp-updates-plugin.php and wp-updates-theme.php files are now generated specific to your theme or plugin and accessed from the plugin or theme screen. That means the call to the WPUpdatesPluginUpdater or WPUpdatesThemeUpdater now has your plugin or theme ID as a suffix, eg. WPUpdatesThemeUpdater_101. This means the plugin or theme ID is no longer required as a parameter:

new WPUpdatesPluginUpdater_x( 'http://wp-updates.com/api/2/plugin', plugin_basename(__FILE__) );

We have just released an update to the wp-updates-plugin.php file for plugins. This fixes an issue we have recently encountered if there is a free plugin hosted on the WordPress.org repository with very similar name to a premium plugin on WP Updates. If the free version has a higher version number than the premium plugin, WordPress shows an update available for the premium plugin but will actually serve the update of the free version.

To apply this fix to your premium plugin login to your dashboard and select the plugin you want to update. Download the new version of the wp-updates-plugin.php file and make sure you have updated the code in your plugin to call the WPUpdatesPluginUpdater if you haven’t yet done so, to reflect the aforementioned changes.

Leave a Reply