Automattic\WooCommerce\Internal\Features
FeaturesController::feature_exists
Check whether a feature exists with a given id.
Method of the class: FeaturesController{}
No Hooks.
Returns
true|false. True if the feature exists.
Usage
// private - for code of main (parent) class only $result = $this->feature_exists( $feature_id ): bool;
- $feature_id(string) (required)
- The feature id to check.
FeaturesController::feature_exists() FeaturesController::feature exists code WC 10.8.1
private function feature_exists( string $feature_id ): bool {
$features = $this->get_feature_definitions();
return isset( $features[ $feature_id ] );
}