Automattic\WooCommerce\Utilities
FeaturesUtil::get_features
Get all the existing WooCommerce features.
Returns an associative array where keys are unique feature ids and values are arrays with these keys:
- name
- description
- is_experimental
- is_enabled (if
$include_enabled_infois passed as true)
Method of the class: FeaturesUtil{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = FeaturesUtil::get_features( $include_experimental, $include_enabled_info ): array;
- $include_experimental(true|false)
- Include also experimental/work in progress features in the list.
Default:false - $include_enabled_info(true|false)
- True to include the
'is_enabled'field in the returned features info.
Default:false
FeaturesUtil::get_features() FeaturesUtil::get features code WC 10.8.1
public static function get_features( bool $include_experimental = false, bool $include_enabled_info = false ): array {
return wc_get_container()->get( FeaturesController::class )->get_features( $include_experimental, $include_enabled_info );
}