Wocart

@wocart/storefront v3.1.0


@wocart/storefront / index / communesForWilaya

Function: communesForWilaya()

communesForWilaya(wilayaId): Commune[]

The communes of one wilaya, shaped as the wire model: Commune[].

Answers [] for a wilaya the bundle does not know — the caller then decides whether that is "no localities to show" or "ask the server" (geo.communes() asks). Accepts the string form an <input>/<select> hands over, so a browser caller never has to parse first.

Parameters

wilayaId

string | number

Returns

Commune[]