WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Plugin_Updates::get_untested_plugins() public WC 1.0

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

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.

Это метод класса: WC_Plugin_Updates{}

Хуков нет.

Возвращает

Массив. of plugin info arrays

Использование

$WC_Plugin_Updates = new WC_Plugin_Updates();
$WC_Plugin_Updates->get_untested_plugins( $new_version, $release );
$new_version(строка) (обязательный)
WooCommerce version to test against.
$release(строка) (обязательный)
'major' or 'minor'.

Код WC_Plugin_Updates::get_untested_plugins() WC 4.5.2

woocommerce/includes/admin/plugin-updates/class-wc-plugin-updates.php
<?php
public function get_untested_plugins( $new_version, $release ) {
	$extensions        = array_merge( $this->get_plugins_with_header( self::VERSION_TESTED_HEADER ), $this->get_plugins_for_woocommerce() );
	$untested          = array();
	$new_version_parts = explode( '.', $new_version );
	$version           = $new_version_parts[0];

	if ( 'minor' === $release ) {
		$version .= '.' . $new_version_parts[1];
	}

	if ( 'major' === $release ) {
		$current_version_parts = explode( '.', Constants::get_constant( 'WC_VERSION' ) );

		// If user has already moved to the major version, we don't need to flag up anything.
		if ( version_compare( $current_version_parts[0] . '.' . $current_version_parts[1], $new_version_parts[0] . '.0', '>=' ) ) {
			return array();
		}
	}

	foreach ( $extensions as $file => $plugin ) {
		if ( ! empty( $plugin[ self::VERSION_TESTED_HEADER ] ) ) {
			$plugin_version_parts = explode( '.', $plugin[ self::VERSION_TESTED_HEADER ] );

			if ( ! is_numeric( $plugin_version_parts[0] )
				|| ( 'minor' === $release && ! isset( $plugin_version_parts[1] ) )
				|| ( 'minor' === $release && ! is_numeric( $plugin_version_parts[1] ) )
				) {
				continue;
			}

			$plugin_version = $plugin_version_parts[0];

			if ( 'minor' === $release ) {
				$plugin_version .= '.' . $plugin_version_parts[1];
			}

			if ( version_compare( $plugin_version, $version, '<' ) ) {
				$untested[ $file ] = $plugin;
			}
		} else {
			$plugin[ self::VERSION_TESTED_HEADER ] = __( 'unknown', 'woocommerce' );
			$untested[ $file ]                     = $plugin;
		}
	}

	return $untested;
}