Skip to content

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

ParameterTypeDescription
$shouldLogboolWhether to log this exchange. Default true.
$urlstringThe request URL.
$parsedArgsarray<string, mixed>The request arguments passed to wp_remote_request().
$responsemixedThe response array or a WP_Error.

Returns bool — Whether to log the exchange.

Fires in

Example

boolean_smtp_debug_should_log_http.php
add_filter( 'boolean_smtp_debug_should_log_http', function ( bool $shouldLog, string $url, array $parsedArgs, $response ) {
return $shouldLog;
}, 10, 4 );

Next steps