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.6.1

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

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