Automattic\WooCommerce\Utilities

FeaturesUtil::feature_is_enabled()public staticWC 1.0

Check if a given feature is currently enabled.

Method of the class: FeaturesUtil{}

No Hooks.

Return

true|false. True if the feature is enabled, false if not or if the feature doesn't exist.

Usage

$result = FeaturesUtil::feature_is_enabled( $feature_id ): bool;
$feature_id(string) (required)
Unique feature id.

FeaturesUtil::feature_is_enabled() code WC 8.7.0

public static function feature_is_enabled( string $feature_id ): bool {
	return wc_get_container()->get( FeaturesController::class )->feature_is_enabled( $feature_id );
}