PHP code example of magicoli / wp-package-updater-lib

1. Go to this page and download the library: Download magicoli/wp-package-updater-lib 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/ */

    

magicoli / wp-package-updater-lib example snippets


// Adjust with your plugin uddate server URL
$wppul_server = 'https://magiiic.com';
$wppul_licence_



$prefix_updater = new WP_Package_Updater(
  'https://your-update-server.com',
  wp_normalize_path( __FILE__ ),
  wp_normalize_path( plugin_dir_path( __FILE__ ) ),
);



$prefix_updater = new WP_Package_Updater(
  'https://your-update-server.com',
  wp_normalize_path( __FILE__ ),
  wp_normalize_path( plugin_dir_path( __FILE__ ) ),
  true
);



$prefix_updater = new WP_Package_Updater(
  'https://your-update-server.com',
  wp_normalize_path( __FILE__ ),
  get_stylesheet_directory(),
);



$prefix_updater = new WP_Package_Updater(
  'https://your-update-server.com',
  wp_normalize_path( __FILE__ ),
  get_stylesheet_directory(),
  true
);
json
"scripts": {
  "post-update-cmd": [
    "php vendor/magicoli/wp-package-updater-lib/install.php"
  ]
}