Skip to content

WordPress integration options

When integrating your WordPress plugin with WunderUpdates, you can configure the update class with a number of options. These options mainly control how the plugin looks and behaves on the WordPress plugins screen.

Example of a plugin row with a license key popup and update channel selection both enabled:

A WunderUpdates enabled plugin with updates available

Required options

The following options are required, the update class will throw an error on initialization if you omit any of these.

KeyDescription
plugin_nameHuman readable plugin name
slugSlug, or subfolder of your plugin, must be unique
versionCurrent plugin version
full_pathFull path of your plugin file, usually __FILE__
account_keyThe account name/key as provided via the API

License options

These options controls plugin licensing.

KeyDefaultDescription
licensedfalseShould the plugin send a license key when checking for update?
license_popupfalseEnable the license key popup on the WordPress plugins screen?
license_option_keyName of WordPress option where the license key is stored.
license_popup_strings[]Array for providing your own strings for the license key popup.

licensed

If the plugin is licensed on the WunderUpdates platform this needs to be set to true, otherwise the plugin will not send the license key when checking for updates.

license_popup

If your plugin doesn't have a settings page or if it's not suitable to add a license key field to it, you can enable the license key popup. This will show a popup on the WordPress plugins screen where the user can enter the license key and get it validated against the WunderUpdates API. If enabled, there will be an extra link Enter license on the plugin row in the WordPress plugins screen, see the image above.

license_option_key

The name of the WordPress option where the license key is stored after the popup has been used. If you leave this empty the license key will stored in the WordPress options table with the key wunderupdates_license_{slug}.

license_popup_strings

When the license key popup is enabled you can provide your own strings for the popup using this array. The array can contain the following keys:

KeyDescription
titlePopup title.
descriptionShort description before the input field
validation_successValidation success message.
validation_failValidation failure message.

Update channel options

These options controls the plugin update channel.

KeyDefaultDescription
channel_popupEnable the chanel key popup on the WordPress plugins screen.
channel_option_keyName of WordPress option where the channel type is stored.
channel_popup_strings[]Array for providing your own string for the channels popup.
channelstableWhich channel to use.

channel_popup

Just as with the license key popup, you can enable a channel popup. This will show a popup on the WordPress plugins screen where the user can select the update channel. If enabled, there will be an extra link with the current chaannel on the name plugin row, by clicking this link the user can select a different channel.

channel_option_key

The name of the WordPress option where the update channel is stored after the popup has been used. If you leave this empty the license key will stored in the WordPress options table with the key wunderupdates_channel_{slug}.

channel_popup_strings

When the channel popup is enabled you can provide your own string for the popup title via this array:

KeyDescription
titlePopup title.

channel

If you don't want the users to be able to select the channel via the popup or your own settings page, but you still want to override the default stable, you can set this option to the channel you want to use. Valid values are stable, rc, beta and alpha. If you leave this empty the default channel will be stable.

Note that for any other channel than stable, the channel name will be visible on the plugin row, but the user will not be able to change it unless you enable the channel popup.