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

***

[@wocart/storefront](../../README) / [index](../README) / 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`](../type-aliases/PickerVariant)

## Parameters

### product

`Catalog`\<`V`\>

### selection

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

### option

`string`

### value

`string`

## Returns

`object`

### selection

> **selection**: [`OptionSelection`](../type-aliases/OptionSelection)

### variant

> **variant**: `V`
