Automattic\WooCommerce\Internal\Admin

FeaturePlugin::replace_supported_features()publicWC 1.0

Overwrites the allowed features array using a local feature-config.php file.

Method of the class: FeaturePlugin{}

Hooks from the method

Return

null. Nothing.

Usage

$FeaturePlugin = new FeaturePlugin();
$FeaturePlugin->replace_supported_features( $features );
$features(array) (required)
Array of feature slugs.

FeaturePlugin::replace_supported_features() code WC 7.1.0

public function replace_supported_features( $features ) {
	/**
	 * Get additional feature config
	 *
	 * @since 6.5.0
	 */
	$feature_config = apply_filters( 'woocommerce_admin_get_feature_config', wc_admin_get_feature_config() );
	$features       = array_keys( array_filter( $feature_config ) );
	return $features;
}