Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions
EvaluateSuggestion::get_memo_key()
Returns a memoization key for the given specs.
Метод класса: EvaluateSuggestion{}
Хуков нет.
Возвращает
Строку
. The memoization key.
Использование
$result = EvaluateSuggestion::get_memo_key( $specs );
- $specs(массив) (обязательный)
- The specs to generate a key for.
Код EvaluateSuggestion::get_memo_key() EvaluateSuggestion::get memo key WC 9.7.1
private static function get_memo_key( $specs ) { $data = wp_json_encode( $specs ); if ( function_exists( 'hash' ) && in_array( 'xxh3', hash_algos(), true ) ) { // Use xxHash (xxh3) if available. return hash( 'xxh3', $data ); } // Fall back to CRC32. return (string) crc32( $data ); }