@wocart/storefront / index / pickOption
Function: pickOption()
pickOption<
V>(product,selection,option,value):object
The shopper picks value for option. The variant they mean is the one
with that value that keeps most of their other choices — one that can be
sold before one that cannot, then the catalog's order. Null, with the
selection unchanged, when no variant has the value.
Type Parameters
V
V extends PickerVariant
Parameters
product
Catalog<V>
selection
option
string
value
string
Returns
object
selection
selection:
OptionSelection
variant
variant:
V