Automattic\WooCommerce\Internal\Features

FeaturesController::feature_exists()privateWC 1.0

Check whether a feature exists with a given id.

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

Хуков нет.

Возвращает

true|false. True if the feature exists.

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

// private - только в коде основоного (родительского) класса
$result = $this->feature_exists( $feature_id ): bool;
$feature_id(строка) (обязательный)
The feature id to check.

Код FeaturesController::feature_exists() WC 8.7.0

private function feature_exists( string $feature_id ): bool {
	$features = $this->get_feature_definitions();

	return isset( $features[ $feature_id ] );
}