# Class EDD_SL_Plugin_Updater

Allows plugins to use their own update API.

Package: EDD\Reviews\Licensing
Author: Pippin Williamson
Version: 1.0
Located at classes/class-edd-sl-plugin-updater.php

## Methods summary

`public` | # `__construct( string $_api_url, string $_plugin_file, array $_api_data = null )` Class constructor. Class constructor. #### Parameters $_api_url `string` $_api_url The URL pointing to the custom API endpoint. $_plugin_file `string` $_plugin_file Path to the plugin file. $_api_data `array` $_api_data Optional data to send with API calls. #### Since 1.0 #### Uses plugin_basename() hook()
`public array` | # `pre_set_site_transient_update_plugins_filter( array $_transient_data )` Check for Updates at the defined API endpoint and modify the update array. Check for Updates at the defined API endpoint and modify the update array. This function dives into the update api just when Wordpress creates its update array, then adds a custom API call and injects the custom plugin data retrieved from the API. It is reassembled from parts of the native Wordpress plugin update code. See wp-includes/update.php line 121 for the original wp_update_plugins() function. #### Parameters $_transient_data `array` $_transient_data Update array build by Wordpress. #### Returns `array` Modified update array with custom plugin data. #### Since 1.0 #### Uses EDD_SL_Plugin_Updater::api_request()
`public object` | # `plugins_api_filter( mixed $_data, string $_action = '', object $_args = null )` Updates information on the "View version x.x details" page with custom data. Updates information on the "View version x.x details" page with custom data. #### Parameters $_data `mixed` $_data $_action `string` $_action $_args `object` $_args #### Returns `object` $_data #### Since 1.0 #### Uses EDD_SL_Plugin_Updater::api_request()

### Magic methods summary