Automattic\WooCommerce\Admin\Features

Features::get_optional_feature_options()public staticWC 1.0

Gets the optional feature options as an associative array that can be toggled on or off.

Method of the class: Features{}

No Hooks.

Return

Array.

Usage

$result = Features::get_optional_feature_options();

Features::get_optional_feature_options() code WC 8.7.0

public static function get_optional_feature_options() {
	$features = [];

	foreach ( array_keys( self::$optional_features ) as $optional_feature_key ) {
		$feature_class = self::get_feature_class( $optional_feature_key );

		if ( $feature_class ) {
			$features[ $optional_feature_key ] = $feature_class::TOGGLE_OPTION_NAME;
		}
	}
	return $features;
}