# boolean_smtp_before_connection_delete

> Fires immediately before a connection is deleted.

Action · Tier A · Since 1.0.0



## Signature

```php
add_action( 'boolean_smtp_before_connection_delete', $callback, 10, 1 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$payload` | `array<string, mixed>` |  |
| &nbsp;&nbsp;`id` | `int` | Id of the connection about to be deleted. |
| &nbsp;&nbsp;`data` | `array<string, mixed>` | The connection's full record before deletion. |
| &nbsp;&nbsp;`timestamp` | `int` | Unix timestamp of the request. |

## Fires in

- [app/Http/Controllers/ConnectionController.php:293](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Http/Controllers/ConnectionController.php#L293) — `BooleanSmtp\Http\Controllers\ConnectionController::destroy()`
- [app/Http/Controllers/ConnectionController.php:348](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Http/Controllers/ConnectionController.php#L348) — `BooleanSmtp\Http\Controllers\ConnectionController::bulkDestroy()`

## Example

```php
add_action( 'boolean_smtp_before_connection_delete', function ( array $payload ) {
    // React to the event.
}, 10, 1 );
```
