Automattic\WooCommerce\Admin\API

MobileAppQRLogin::delete_session_mapping_for_recordprivateWC 1.0

Delete the session-id to token-hash mapping for a token record.

Method of the class: MobileAppQRLogin{}

No Hooks.

Returns

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->delete_session_mapping_for_record( $token_data );
$token_data(array) (required)
.

MobileAppQRLogin::delete_session_mapping_for_record() code WC 11.0.1

private function delete_session_mapping_for_record( array $token_data ) {
	if ( empty( $token_data['challenge']['session_id'] ) ) {
		return;
	}

	delete_transient(
		self::SESSION_TRANSIENT_PREFIX . hash( 'sha256', (string) $token_data['challenge']['session_id'] )
	);
}