WooCommerce Code Reference

WC_Updates_Screen_Updates extends WC_Plugin_Updates
in package

Class WC_Updates_Screen_Updates

Table of Contents

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

Constants

Properties

Methods

get_untested_plugins()

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

public get_untested_plugins(string $new_version, string $release) : 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
arrayof plugin info arrays

get_plugins_with_header()

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

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

Plugin header to search for.

Return values
arrayArray of plugins that contain the searched header.