Automattic\WooCommerce\Internal\Admin\Logging\FileV2
File::generate_hash()
Generate a hash to use as the suffix on a log filename.
Метод класса: File{}
Хуков нет.
Возвращает
Строку
.
Использование
$result = File::generate_hash( $file_id ): string;
- $file_id(строка) (обязательный)
- A file ID (file basename without the hash).
Код File::generate_hash() File::generate hash WC 9.7.1
public static function generate_hash( string $file_id ): string { $key = Constants::get_constant( 'AUTH_SALT' ) ?? 'wc-logs'; return hash_hmac( 'md5', $file_id, $key ); }