# initializeOrder:before

> Runs when the checkout is submitted, before the data is validated. The last point at which you can refuse an order.

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

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

## Parameters

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

## Return type

`void`
