wc_rand_hash()WC 2.4.0

Generate a rand hash.

Хуков нет.

Возвращает

Строку.

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

wc_rand_hash();

Список изменений

С версии 2.4.0 Введена.

Код wc_rand_hash() WC 8.7.0

function wc_rand_hash() {
	if ( ! function_exists( 'openssl_random_pseudo_bytes' ) ) {
		return sha1( wp_rand() );
	}

	return bin2hex( openssl_random_pseudo_bytes( 20 ) ); // @codingStandardsIgnoreLine
}