# cart.create:before

> Runs while the cart object is being built, before it is read from the session.

- Source: `config/hooks.php#L77` <https://github.com/wagnerwagner/merx/blob/2.0.0-alpha.11/config/hooks.php#L77>

```php
'wagnerwagner.merx.cart.create:before' => function (Wagnerwagner\Merx\Cart $cart, array $data): void {}
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `$cart` | `Wagnerwagner\Merx\Cart` | `–` |
| `$data` | `array` | `–` |

## Return type

`void`
