Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / 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

crypto?

UuidSource

Returns

() => void