alledia / edd-sl-plugin-updater
EDD Updates Handler for WordPress Plugins
Installs: 31 092
Dependents: 3
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 29
Open Issues: 1
Requires
- php: >=5.6.20
- ext-json: *
This package is auto-updated.
Last update: 2025-03-01 00:24:34 UTC
README
This library should be used on add-ons or plugins sold on EDD. It handles the updates for plugins integrated with Easy Digital Downloads in WordPress sites.
Requirements
This class can only be used with EDD v1.7 and later.
How to use it
Installing
Add as a requirement using composer:
$ composer require alledia/edd-sl-plugin-updater
Or add it manually to the composer.json file:
{ "require": { "alledia/edd-sl-plugin-updater": "dev-master" } }
Loading and initializing
<?php add_action('admin_init', 'init_updater'); function init_updater() { // The site for the EDD store. $apiUrl = 'https://site-with-edd.com'; $pluginFile = 'your-plugin/your-plugin.php'; // The version of your add-on/plugin. $currentVersion = '1.0.5'; // ID for the add-on/plugin on EDD. $addonEddId = '3252'; $author = 'Your Name'; // Initialize the library. $updater = new Alledia\EDD_SL_Plugin_Updater( $apiUrl, $pluginFile, [ 'version' => $currentVersion, 'license' => get_option('upstream_frontend_edit_license_key'), 'item_id' => $addonEddId, 'author' => $author, 'beta' => false, ] ); }