Automattic\WooCommerce\Utilities
FeaturesUtil::feature_is_enabled()
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() FeaturesUtil::feature is enabled code WC 9.4.2
public static function feature_is_enabled( string $feature_id ): bool { return wc_get_container()->get( FeaturesController::class )->feature_is_enabled( $feature_id ); }