# boolean_smtp_load_first

> Filters whether BooleanSMTP keeps itself first in the plugin load order.

Filter · Tier A · Since 1.0.0

Being first is what lets the plugin define `wp_mail()` and therefore send, log and alert on the site's email. Return false to leave the order alone — on a site that deliberately lets another plugin handle mail, for instance.

## Signature

```php
add_filter( 'boolean_smtp_load_first', $callback, 10, 2 );
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `$enabled` | `bool` | Whether to move the plugin to the front. Default true. |
| `$pluginFile` | `string` | The plugin's entry file, as `plugin_basename()` returns it. |

**Returns** `bool` — Whether to move the plugin to the front.

## Fires in

- [app/Support/PluginLoadOrder.php:155](https://github.com/booleanpress/boolean-smtp-src/blob/main/app/Support/PluginLoadOrder.php#L155) — `BooleanSmtp\Support\PluginLoadOrder::enabled()`

## Example

```php
add_filter( 'boolean_smtp_load_first', function ( bool $enabled, string $pluginFile ) {
    return $enabled;
}, 10, 2 );
```
