PHP code example of springdevs / wp-update

1. Go to this page and download the library: Download springdevs/wp-update 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/ */

    

springdevs / wp-update example snippets


composer 


add_action('init', 'update_plugin');

function update_plugin() {
    new \SpringDevs\WpUpdate\Update(
        PLUGIN_CURRENT_VERSION,
        'https://example.com/check-update',
        'plugin-dir/plugin.php'
    );
}