WooCommerce Code Reference

WC_Plugins_Screen_Updates extends WC_Plugin_Updates
in package

Class WC_Plugins_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<string|int, mixed>
Array of plugins lacking testing with the major version.
$new_version  : string
The version for the update to WooCommerce.
$upgrade_notice  : string
The upgrade notice shown inline.
__construct()  : mixed
Constructor.
get_untested_plugins()  : array<string|int, mixed>
Get installed plugins that have a tested version lower than the input version.
in_plugin_update_message()  : mixed
Show plugin changes on the plugins screen. Code adapted from W3 Total Cache.
plugin_screen_modal_js()  : mixed
JS for the modal window on the plugins screen.
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.
get_upgrade_notice()  : string
Get the upgrade notice from WordPress.org.
parse_update_notice()  : string
Parse update notice from readme file.

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

in_plugin_update_message()

Show plugin changes on the plugins screen. Code adapted from W3 Total Cache.

public in_plugin_update_message(array<string|int, mixed> $args, stdClass $response) : mixed
Parameters
$args : array<string|int, mixed>

Unused parameter.

$response : stdClass

Plugin update response.

Return values
mixed

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.

parse_update_notice()

Parse update notice from readme file.

private parse_update_notice(string $content, string $new_version) : string
Parameters
$content : string

WooCommerce readme file content.

$new_version : string

WooCommerce new version.

Return values
string