Automattic\WooCommerce\Internal\EmailEditor\WCTransactionalEmails
WCEmailTemplateAutoApplier::is_sha1_hash
Validate that a string is shaped like a SHA-1 hex digest.
Метод класса: WCEmailTemplateAutoApplier{}
Хуков нет.
Возвращает
true|false. True when the value is a 40-character hex string.
Использование
$result = WCEmailTemplateAutoApplier::is_sha1_hash( $hash ): bool;
- $hash(строка) (обязательный)
- Candidate hash value.
Код WCEmailTemplateAutoApplier::is_sha1_hash() WCEmailTemplateAutoApplier::is sha1 hash WC 10.9.1
private static function is_sha1_hash( string $hash ): bool {
return 40 === strlen( $hash ) && ctype_xdigit( $hash );
}