With the Software Licensing extension for Easy Digital Downloads you can set up automatic upgrades for themes. This does not mean that your customer's theme will update itself but rather that your customer may update their theme using the traditional WordPress update tools, as if the theme were hosted on WordPress.org.
In your Software Licensing extension is a directory called /samples/edd-sample-theme/updater/. This folder needs to be copied into your theme's main folder.
* Load theme updater functions.
* Action is used so that child themes can easily disable.
Please change the prefix to something that matches your theme. This code includes the updater code.
Your theme should be zipped just like any other theme, there's no difference. Then create a new Download in Easy Digital Downloads.
Complete everything as you would a normal product, uploading your theme and giving it a price etc.
Then be sure to check the box to enable licensing. This is key to the update process.
Most of the settings in the Licensing meta box can be set to whatever you like, but the version number is important. When you increment the version number it will alert your customer's sites that there's a new version. For your initial version pick something and then only make it larger when it's time for a new version. Example: start at 1.0 and then only go to 1.1 when you want everyone to get a new version.
When you choose to release a new version, replace the old file with the new one. Then enter some text into the Changelog field in the Licensing meta box. Lastly, increment the version number and save the download. Then your customer's sites will be notified that there's a new version, and they will be able to click Update.
As of version 3.5 of Software Licensing, it is possible to release beta versions of your theme. See the documentation on how to release beta versions.
In order for customers to receive beta version notifications, 'beta' => true must be supplied in the $config array shown above. If you wish for your customers to have a way to opt into beta version, you will need to supply an interface for that. We recommend adding a checkbox to your theme settings page that allows customers to opt into beta versions. You can then set the beta flag in the config array dynamically based on the checked state of that checkbox.
The code shown on this page is purely for demonstrative purposes and is not meant to be used as is. Do not copy and paste it into your plugin and expect it to work as is.
All function names added to your plugin need to get a unique prefix. We have used edd_sample_ throughout this example. Do not keep edd_sample_ in your own plugin, replace it with your own unique prefix.
The names of the constants must be changed. Do not keep them as EDD_SL_ITEM_ID and EDD_SL_STORE_URL. Use your own unique constants.
If you have issues with SSL verification when requesting updates, you can use the `edd_sl_api_request_verify_ssl` filter to disable the SSL Verification flag.