boolean_smtp_connection_saved
Fires after a connection has been written to the database, wherever the write came from.
action Tier A Since 1.0.0
Fires for the admin UI, the settings importer, the migration from another plugin, the Pro one-click flows and the OAuth token refresh alike — every path goes through the connection repository. `boolean_smtp_connection_created` and `boolean_smtp_connection_updated` are the admin UI's own events and fire only there. The connection's credentials are encrypted at rest; decrypt `$connection->settings` through the encryptor contract if you need them.
Signature
add_action( 'boolean_smtp_connection_saved', $callback, 10, 2 );Parameters
| Parameter | Type | Description |
|---|---|---|
$connection | \BooleanSmtp\Models\Connection | The connection as stored. |
$created | bool | True when the row was just created, false when it was updated. |
Fires in
app/Repositories/ConnectionRepository.php:189—BooleanSmtp\Repositories\ConnectionRepository::announceSaved()
Example
add_action( 'boolean_smtp_connection_saved', function ( \BooleanSmtp\Models\Connection $connection, bool $created ) { // React to the event.}, 10, 2 );Next steps
- Connections and OAuth — every hook in this area, in firing order where that applies.
- Hook Explorer — filter and search every hook.