Automattic\WooCommerce\Utilities

FeaturesUtil::feature_is_enabled()public staticWC 1.0

Check if a given feature is currently enabled.

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

Хуков нет.

Возвращает

true|false. True if the feature is enabled, false if not or if the feature doesn't exist.

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

$result = FeaturesUtil::feature_is_enabled( $feature_id ): bool;
$feature_id(строка) (обязательный)
Unique feature id.

Код FeaturesUtil::feature_is_enabled() WC 7.1.0

public static function feature_is_enabled( string $feature_id ): bool {
	return wc_get_container()->get( FeaturesController::class )->feature_is_enabled( $feature_id );
}