Automattic\WooCommerce\Admin\Features

Features::get_legacy_feature_compatibility_values │ public static │ WC 11.1.0

Gets legacy feature flag compatibility values.

This method is intended for passive compatibility paths, such as script globals and filtering shared settings, where emitting deprecation notices would warn on every admin page load.

Метод класса: Features{}

Хуков нет.

Возвращает

array<string, bool>.

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

$result = Features::get_legacy_feature_compatibility_values();

Список изменений

С версии 11.1.0 Введена.

Код Features::get_legacy_feature_compatibility_values() WC 11.2.2

public static function get_legacy_feature_compatibility_values() {
	$compatibility_values = array_merge(
		array_fill_keys( array_keys( self::$retired_feature_compatibility_versions ), true ),
		array(
			'analytics'                  => self::is_analytics_enabled(),
			'remote-inbox-notifications' => 'yes' === get_option( RemoteInboxNotifications::TOGGLE_OPTION_NAME, 'yes' ),
		)
	);

	return array_intersect_key(
		$compatibility_values,
		array_flip( self::get_features_with_legacy_compatibility_defaults() )
	);
}