Filter since v1.0.0
fswa_http_args
Filters the full `wp_remote_request()` arguments array before the HTTP call.
$
/ Signature
apply_filters( 'fswa_http_args', $args, $url, $payload )
/ When it fires
Fires immediately before `wp_remote_request()` is called.
/ Parameters
| Name | In | Type | Req | Description |
|---|---|---|---|---|
| $args | param | array | yes | Full `wp_remote_request()` args including `method`, `headers`, `body`, `timeout`, `sslverify`. |
| $url | param | string | yes | The resolved endpoint URL. |
| $payload | param | array | yes | The outgoing payload array. |
/ Returns
array Modified `wp_remote_request()` args./ Examples
Disable SSL verification in local development
add_filter( 'fswa_http_args', function ( $args, $url, $payload ) { if ( defined( 'WP_LOCAL_DEV' ) && WP_LOCAL_DEV ) { $args['sslverify'] = false; } return $args; }, 10, 3 );
/ Related
Ready Stop losing webhooks.
Stop losing webhooks.
Start logging them.
$ wp plugin install flowsystems-webhook-actions --activate