Automattic\WooCommerce\Api\Infrastructure
Main::is_opcache_enabled
Whether the OPcache-backed query cache is enabled.
Defaults to true. Activation also depends on OPcache being loaded and the cache directory being writable; see QueryCache{} for the runtime capability check.
Метод класса: Main{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$result = Main::is_opcache_enabled(): bool;
Код Main::is_opcache_enabled() Main::is opcache enabled WC 11.0.1
public static function is_opcache_enabled(): bool {
return wc_string_to_bool( get_option( self::OPTION_OPCACHE_ENABLED, 'yes' ) );
}