Automattic\WooCommerce\Internal\Features

FeaturesController::get_feature_definition │ public │ WC 10.5.0

Get the definition array for a specific feature.

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

Хуков нет.

Возвращает

array|null. The feature definition array, or null if the feature doesn't exist.

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

$FeaturesController = new FeaturesController();
$FeaturesController->get_feature_definition( $feature_id ): ?array;
$feature_id(строка) (обязательный)
Unique feature id.

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

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

Код FeaturesController::get_feature_definition() WC 11.3.0

public function get_feature_definition( string $feature_id ): ?array {
	return $this->get_feature_definitions()[ $feature_id ] ?? null;
}