@wocart/storefront / index / initialVariant
Function: initialVariant()
initialVariant<
V>(product):V
The variant a product page opens on: the merchant's default when it can be sold, else the first that can, else the default (or first) shown sold out.
Type Parameters
V
V extends PickerVariant
Parameters
product
Catalog<V>
Returns
V