Inventory_Presser_Addon::initialize_updater( string $class_name, string $plugin_path, string $license_key, string $include_betas = false )
initialize_updater
On This Page
Parameters Parameters
- $class_name
-
(string) (Required) The class name in the add-on plugin’s main file that contains the VERSION and LICENSE_ITEM constants
- $plugin_path
-
(string) (Required) The file path to the plugin for which we are checking for updates
- $license_key
-
(string) (Required) The license key provided by inventorypresser.com upon purchase
- $include_betas
-
(string) (Optional) Set to true if you wish customers to receive update notifications of beta releases
Default value: false
Return Return
(void)
Source Source
File: includes/addon/class-addon.php
public static function initialize_updater( $class_name, $plugin_path, $license_key, $include_betas = false ) { // check for existence of updater class if ( ! class_exists( 'Inventory_Presser_Addon_Updater' ) ) { return; } // Does the plugin class have the VERSION and LICENSE_ITEM constants? if ( empty( $class_name::VERSION ) || empty( $class_name::LICENSE_ITEM ) ) { return; } $updater = new Inventory_Presser_Addon_Updater( 'https://inventorypresser.com', $plugin_path, array( 'version' => $class_name::VERSION, // current version number 'license' => $license_key, 'item_id' => $class_name::LICENSE_ITEM, // id of this download in inventorypresser.com 'author' => 'Corey Salzano', 'url' => home_url(), // the site requesting the update, this site 'beta' => $include_betas, ) ); }
Expand full source codeCollapse full source codeView on Github