Class EDD_AC_WOO_Plugin_Updater
Allows plugins to use their own update API.
Methods summary
public
|
#
__construct( string $_api_url, string $_plugin_file, array $_api_data = null )
Class constructor.
Parameters
- $_api_url
- The URL pointing to the custom API endpoint.
- $_plugin_file
- Path to the plugin file.
- $_api_data
- Optional data to send with API calls.
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
- Update array build by Wordpress.
Returns
array Modified update array with custom plugin data.
Uses
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
Returns
object $_data
Uses
api_request()
|