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<string|int, mixed>
- 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<string|int, mixed>
- 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<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.
- update_screen_modal_js() : mixed
- JS for the modal window on the updates screen.
Constants
VERSION_REQUIRED_HEADER
This is the header used by extensions to show requirements.
public
string
VERSION_REQUIRED_HEADER
= 'WC requires at least'
VERSION_TESTED_HEADER
This is the header used by extensions to show testing.
public
string
VERSION_TESTED_HEADER
= 'WC tested up to'
Properties
$major_untested_plugins
Array of plugins lacking testing with the major version.
protected
array<string|int, mixed>
$major_untested_plugins
= array()
$new_version
The version for the update to WooCommerce.
protected
string
$new_version
= ''
Methods
__construct()
Constructor.
public
__construct() : mixed
Return values
mixed —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 arraysupdate_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 —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_plugins_for_woocommerce()
Get plugins which "maybe" are for WooCommerce.
protected
get_plugins_for_woocommerce() : array<string|int, mixed>
Return values
array<string|int, mixed> — of plugin info arraysget_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.update_screen_modal_js()
JS for the modal window on the updates screen.
protected
update_screen_modal_js() : mixed