Automattic\WooCommerce\Api\Infrastructure
Main::is_enabled
Check whether the Dual Code & GraphQL API feature is active.
Requires PHP 8.1+ and the dual_code_graphql_api feature flag to be enabled.
Метод класса: Main{}
Хуков нет.
Возвращает
true|false.
Использование
$result = Main::is_enabled(): bool;
Код Main::is_enabled() Main::is enabled WC 11.0.1
public static function is_enabled(): bool {
return PHP_VERSION_ID >= 80100 && FeaturesUtil::feature_is_enabled( self::FEATURE_SLUG );
}