Inventory_Presser_Addon::initialize_updater( string $class_name, string $plugin_path, string $license_key, string $include_betas = false )


Parameters Parameters


(string) (Required) The class name in the add-on plugin's main file that contains the VERSION and LICENSE_ITEM constants


(string) (Required) The file path to the plugin for which we are checking for updates


(string) (Required) The license key provided by upon purchase


(string) (Optional) Set to true if you wish customers to receive update notifications of beta releases

Default value: false

Top ↑

Return Return


Top ↑

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' ) ) {

			//Does the plugin class have the VERSION and LICENSE_ITEM constants?
			if ( empty( $class_name::VERSION ) || empty( $class_name::LICENSE_ITEM ) ) {

			$updater = new Inventory_Presser_Addon_Updater(
					'version' => $class_name::VERSION, //current version number
					'license' => $license_key,
					'item_id' => $class_name::LICENSE_ITEM, //id of this download in
					'author'  => 'Corey Salzano',
					'url'     => home_url(), //the site requesting the update, this site
					'beta'    => $include_betas