WooCommerce Code Reference

WC_Plugin_Updates
in package

WC_Admin_Plugin_Updates Class.

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<string|int, mixed>
Array of plugins lacking testing with the major version.
$new_version  : string
The version for the update to WooCommerce.
get_untested_plugins()  : array<string|int, mixed>
Get installed plugins that have a tested version lower than the input version.
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<string|int, mixed>
Get plugins which "maybe" are for WooCommerce.
get_plugins_with_header()  : array<string|int, mixed>
Get plugins that have a valid value for a specific header.

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<string|int, mixed>

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', 'minor', or 'none'.

Return values
array<string|int, mixed>of 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<string|int, mixed>
Parameters
$header : string

Plugin header to search for.

Return values
array<string|int, mixed>Array of plugins that contain the searched header.