Inventory_Presser_Addon_Updater::__construct( string $_api_url, string $_plugin_file, array $_api_data = null )
Class constructor.
On This Page
Parameters Parameters
- $_api_url
-
(string) (Required) The URL pointing to the custom API endpoint.
- $_plugin_file
-
(string) (Required) Path to the plugin file.
- $_api_data
-
(array) (Optional) data to send with API calls.
Default value: null
Source Source
File: includes/addon/class-addon-updater.php
public function __construct( $_api_url, $_plugin_file, $_api_data = null ) { global $edd_plugin_data; $this->api_url = trailingslashit( $_api_url ); $this->api_data = $_api_data; $this->name = plugin_basename( $_plugin_file ); $this->slug = basename( $_plugin_file, '.php' ); $this->version = $_api_data['version']; $this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false; $this->beta = ! empty( $this->api_data['beta'] ) ? true : false; $this->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) ); $edd_plugin_data[ $this->slug ] = $this->api_data; /** * Fires after the $edd_plugin_data is setup. * * @since x.x.x * * @param array $edd_plugin_data Array of EDD SL plugin data. */ do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data ); // Set up hooks. $this->init(); }
Expand full source codeCollapse full source codeView on Github