WC_Tracker::get_enabled_featuresprivate staticWC 1.0

Get an array of slugs for WC features that are enabled on the site.

Method of the class: WC_Tracker{}

No Hooks.

Returns

String[].

Usage

$result = WC_Tracker::get_enabled_features();

WC_Tracker::get_enabled_features() code WC 10.4.3

private static function get_enabled_features() {
	$all_features     = FeaturesUtil::get_features( true, true );
	$enabled_features = array_filter(
		$all_features,
		function ( $feature ) {
			return $feature['is_enabled'];
		}
	);

	return array_keys( $enabled_features );
}