WooCommerce Code Reference

Search results

WC_Updates_Screen_Updates extends WC_Plugin_Updates

Class WC_Updates_Screen_Updates

Table of Contents

$new_version The version for the update to WooCommerce. string
$major_untested_plugins Array of plugins lacking testing with the major version. array
__construct() Constructor. mixed
update_screen_modal() Show a warning message on the upgrades screen if the user tries to upgrade and has untested plugins. mixed
update_screen_modal_js() JS for the modal window on the updates screen. mixed
generic_modal_js() Common JS for initializing and managing thickbox-based modals. mixed
get_extensions_inline_warning_major() Get the inline warning notice for major version updates. string
get_extensions_modal_warning() Get the warning notice for the modal window. string
get_untested_plugins() Get installed plugins that have a tested version lower than the input version. array
get_plugins_with_header() Get plugins that have a valid value for a specific header. array
get_plugins_for_woocommerce() Get plugins which "maybe" are for WooCommerce. array

Properties

$major_untested_plugins

Array of plugins lacking testing with the major version.

protected array $major_untested_plugins = array()

Methods

update_screen_modal()

Show a warning message on the upgrades screen if the user tries to upgrade and has untested plugins.

public update_screen_modal( ) : mixed
Return values
mixed

update_screen_modal_js()

JS for the modal window on the updates screen.

protected update_screen_modal_js( ) : mixed
Return values
mixed

generic_modal_js()

Common JS for initializing and managing thickbox-based modals.

protected generic_modal_js( ) : mixed
Return values
mixed

get_extensions_inline_warning_major()

Get the inline warning notice for major version updates.

protected get_extensions_inline_warning_major( ) : string
Return values
string

get_extensions_modal_warning()

Get the warning notice for the modal window.

protected get_extensions_modal_warning( ) : string
Return values
string

get_untested_plugins()

Get installed plugins that have a tested version lower than the input version.

public get_untested_plugins( $new_version : string , $release : string ) : array

In case of testing major version compatibility and if current WC version is >= major version part of the $new_version, no plugins are returned, even if they don't explicitly declare compatibility with the $new_version.

Parameters
$new_version : string

WooCommerce version to test against.

$release : string

'major' or 'minor'.

Return values
array

of plugin info arrays

get_plugins_with_header()

Get plugins that have a valid value for a specific header.

protected get_plugins_with_header( $header : string ) : array
Parameters
$header : string

Plugin header to search for.

Return values
array

Array of plugins that contain the searched header.

get_plugins_for_woocommerce()

Get plugins which "maybe" are for WooCommerce.

protected get_plugins_for_woocommerce( ) : array
Return values
array

of plugin info arrays

Back to the top