[**@wocart/storefront v3.1.0**](../../README)

***

[@wocart/storefront](../../README) / [index](../README) / bindCheckoutKey

# Function: bindCheckoutKey()

> **bindCheckoutKey**(`form`, `crypto?`): () => `void`

Bind a checkout key to the form; the function returned unbinds it. The key
is added through the form's `formdata` event, so it reaches a native submit
and a `new FormData(form)` alike, whatever order the theme's own submit
handlers run in. A browser without that event sends no key and places its
orders as before.

## Parameters

### form

[`CheckoutKeyForm`](../type-aliases/CheckoutKeyForm)

### crypto?

`UuidSource`

## Returns

() => `void`
