1. Go to this page and download the library: Download shazzad/plugin-updater library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shazzad / plugin-updater example snippets
// Initialize the updater (autoloaded via Composer)
new \Shazzad\PluginUpdater\Integration(
'https://your-api-server.com/api', // API URL
plugin_basename( __FILE__ ), // Plugin file path
'your-product-id', // Product ID
true, // Enable licensing
true, // Display admin menu
'My Plugin License', // Menu label
'plugins.php', // Parent menu
10 // Menu priority
);
new \Shazzad\PluginUpdater\Integration(
'https://api.example.com',
plugin_basename( __FILE__ ),
'my-plugin-id'
);
( new \Shazzad\PluginUpdater\Integration(
'https://api.example.com',
plugin_basename( __FILE__ ),
'my-plugin-id',
true, // Enable licensing
true, // Show admin menu
'My Plugin Updates', // Menu label
'tools.php', // Under Tools menu
20 // Menu priority
) )->setMeta( [
'php_version' => function () { return phpversion(); },
'theme' => function () { return get_stylesheet(); },
] );