Automattic\WooCommerce\Internal\Features

FeaturesController::init_features()privateWC 1.0

Initialize the class according to the existing features.

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

Хуков нет.

Возвращает

null. Ничего.

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

// private - только в коде основоного (родительского) класса
$result = $this->init_features( $features );
$features(массив) (обязательный)
Information about the existing features.

Код FeaturesController::init_features() WC 7.1.1

private function init_features( array $features ) {
	$this->compatibility_info_by_plugin  = array();
	$this->compatibility_info_by_feature = array();

	$this->features = $features;

	foreach ( array_keys( $this->features ) as $feature_id ) {
		$this->compatibility_info_by_feature[ $feature_id ] = array(
			'compatible'   => array(),
			'incompatible' => array(),
		);
	}
}