Automattic\WooCommerce\Internal\Caches

VersionStringGenerator::can_usepublicWC 1.0

Tells whether the version string cache can be used or not.

This will return true only if an external object cache is configured in WordPress, since otherwise the cached entries will only persist for the current request.

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

Хуков нет.

Возвращает

true|false.

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

$VersionStringGenerator = new VersionStringGenerator();
$VersionStringGenerator->can_use(): bool;

Код VersionStringGenerator::can_use() WC 10.9.1

public function can_use(): bool {
	if ( ! is_null( $this->can_use ) ) {
		return $this->can_use;
	}

	$this->can_use = $this->legacy_proxy->call_function( 'wp_using_ext_object_cache' ) ?? false;

	return $this->can_use;
}