Automattic\WooCommerce\Internal\Admin

FeaturePlugin::replace_supported_features()publicWC 1.0

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

Метод класса: FeaturePlugin{}

Хуки из метода

Возвращает

null. Ничего.

Использование

$FeaturePlugin = new FeaturePlugin();
$FeaturePlugin->replace_supported_features( $features );
$features(массив) (обязательный)
Array of feature slugs.

Код FeaturePlugin::replace_supported_features() WC 7.3.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;
}