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

***

[@wocart/storefront](../../README) / [index](../README) / communesForWilaya

# Function: communesForWilaya()

> **communesForWilaya**(`wilayaId`): [`Commune`](../interfaces/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`](../interfaces/Commune)[]
