WC_API_Authentication::is_consumer_secret_valid()privateWC 2.1

Check if the consumer secret provided for the given user is valid

Method of the class: WC_API_Authentication{}

No Hooks.

Return

true|false.

Usage

// private - for code of main (parent) class only
$result = $this->is_consumer_secret_valid( $keys_consumer_secret, $consumer_secret );
$keys_consumer_secret(string) (required)
-
$consumer_secret(string) (required)
-

Changelog

Since 2.1 Introduced.

WC_API_Authentication::is_consumer_secret_valid() code WC 8.7.0

private function is_consumer_secret_valid( $keys_consumer_secret, $consumer_secret ) {
	return hash_equals( $keys_consumer_secret, $consumer_secret );
}