\um\corePlugin_Updater

Class Plugin_Updater

Summary

Methods
Properties
Constants
__construct()
prevent_dangerous_auto_updates()
clean_update_plugins_cache()
get_active_plugins()
um_checklicenses()
check_update()
plugin_information()
http_request_args()
extend_download_url()
get_cache_key()
get_cached_version_info()
set_version_info_cache()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
single_request()
No private properties found
N/A

Methods

__construct()

__construct() : mixed

Plugin_Updater constructor.

Returns

mixed

prevent_dangerous_auto_updates()

prevent_dangerous_auto_updates(bool  $should_update, object  $plugin) : bool

Prevent auto-updating the WooCommerce plugin on major releases if there are untested extensions active.

Parameters

bool $should_update

If should update.

object $plugin

Plugin data.

Returns

bool

clean_update_plugins_cache()

clean_update_plugins_cache(\Plugin_Upgrader  $updater, array  $action = array()) : mixed

This action is documented in wp-admin/includes/class-wp-upgrader.php

Parameters

\Plugin_Upgrader $updater
array $action

Returns

mixed

get_active_plugins()

get_active_plugins() : array

Get all paid UM extensions

Returns

array

um_checklicenses()

um_checklicenses() : mixed

Check license function

Returns

mixed

check_update()

check_update(array  $_transient_data) : \stdClass

Check for Updates by request to the marketplace and modify the update array.

Parameters

array $_transient_data

plugin update array build by WordPress.

Returns

\stdClass —

modified plugin update array.

plugin_information()

plugin_information(mixed  $_data, string  $_action = '', object  $_args = null) : object

Updates information on the "View version x.x details" popup with custom data.

Parameters

mixed $_data
string $_action
object $_args

Returns

object —

$_data

http_request_args()

http_request_args(array  $args, string  $url) : array

Disable SSL verification in order to prevent download update failures

Parameters

array $args
string $url

Returns

array —

$array

extend_download_url()

extend_download_url( $download_url,  $slug,  $data) : string

Download extension URL

Parameters

$download_url
$slug
$data

Returns

string

get_cache_key()

get_cache_key( $slug) : bool|string

Parameters

$slug

Returns

bool|string

get_cached_version_info()

get_cached_version_info( $slug) : array|bool|mixed|object

Parameters

$slug

Returns

array|bool|mixed|object

set_version_info_cache()

set_version_info_cache( $slug, string  $value = '') : mixed

Parameters

$slug
string $value

Returns

mixed

single_request()

single_request(string  $_action, array  $_data) : bool|object

Calls the API and, if successfull, returns the object delivered by the API.

Parameters

string $_action

The requested action.

array $_data

Parameters for the API action.

Returns

bool|object