Automattic\WooCommerce\Internal\Features

FeaturesController::is_legacy_feature()publicWC 1.0

Checks whether a feature id corresponds to a legacy feature (a feature that existed prior to the implementation of the features engine).

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

Хуков нет.

Возвращает

true|false. True if the id corresponds to a legacy feature.

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

$FeaturesController = new FeaturesController();
$FeaturesController->is_legacy_feature( $feature_id ): bool;
$feature_id(строка) (обязательный)
The feature id to check.

Код FeaturesController::is_legacy_feature() WC 8.7.0

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

	return ! empty( $features[ $feature_id ]['is_legacy'] );
}