Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions
EvaluateSuggestion::get_memo_key()
Returns a memoization key for the given specs.
Method of the class: EvaluateSuggestion{}
No Hooks.
Return
String
. The memoization key.
Usage
$result = EvaluateSuggestion::get_memo_key( $specs );
- $specs(array) (required)
- The specs to generate a key for.
EvaluateSuggestion::get_memo_key() EvaluateSuggestion::get memo key code 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 ); }