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

Method of the class: FeaturesController{}

No Hooks.

Return

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

Usage

$FeaturesController = new FeaturesController();
$FeaturesController->is_legacy_feature( $feature_id ): bool;
$feature_id(string) (required)
The feature id to check.

FeaturesController::is_legacy_feature() code 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'] );
}