Automattic\WooCommerce\Internal\Caches

VersionStringGenerator::get_cache_key │ private │ WC 1.0

Get the cache key for an ID.

The ID is hashed to ensure a consistent key length and avoid issues with special characters or very long IDs.

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

Хуков нет.

Возвращает

string. The cache key.

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

// private - только в коде основоного (родительского) класса
$result = $this->get_cache_key( $id ): string;
$id(строка) (обязательный)
The ID to get the cache key for.

Код VersionStringGenerator::get_cache_key() WC 11.2.2

private function get_cache_key( string $id ): string {
	return 'wc_version_string_' . md5( $id );
}