Automattic\WooCommerce\Admin\API
MobileAppQRLogin::claim_token_for_approval
Atomically claim a token for approval.
Method of the class: MobileAppQRLogin{}
No Hooks.
Returns
true|false. True if the claim was acquired.
Usage
// private - for code of main (parent) class only $result = $this->claim_token_for_approval( $token_hash, $expires_at );
- $token_hash(string) (required)
- SHA-256 hash of the plaintext token.
- $expires_at(int) (required)
- Unix timestamp when the claim should expire.
MobileAppQRLogin::claim_token_for_approval() MobileAppQRLogin::claim token for approval code WC 11.0.1
private function claim_token_for_approval( $token_hash, $expires_at ) {
return $this->claim_token_with_option_key(
self::APPROVE_CLAIM_OPTION_PREFIX . $token_hash,
$expires_at
);
}