boolean_smtp_debug_should_log_http
Filters whether an outgoing HTTP request/response is recorded to the debug log.
filter Tier C Since 1.0.0
Signature
add_filter( 'boolean_smtp_debug_should_log_http', $callback, 10, 4 );Parameters
| Parameter | Type | Description |
|---|---|---|
$shouldLog | bool | Whether to log this exchange. Default true. |
$url | string | The request URL. |
$parsedArgs | array<string, mixed> | The request arguments passed to wp_remote_request(). |
$response | mixed | The response array or a WP_Error. |
Returns bool — Whether to log the exchange.
Fires in
app/Support/Debug/WordPressDebugLogger.php:712—BooleanSmtp\Support\Debug\WordPressDebugLogger::onHttpApiDebug()
Example
add_filter( 'boolean_smtp_debug_should_log_http', function ( bool $shouldLog, string $url, array $parsedArgs, $response ) { return $shouldLog;}, 10, 4 );Next steps
- Internal (unstable) — every hook in this area, in firing order where that applies.
- Hook Explorer — filter and search every hook.