woocommerce_webhook_http_args filter-hookWC 3.3.0

Filters the HTTP arguments for the webhook delivery ping.

Usage

add_filter( 'woocommerce_webhook_http_args', 'wp_kama_woocommerce_webhook_http_args_filter', 10, 3 );

/**
 * Function for `woocommerce_webhook_http_args` filter-hook.
 * 
 * @param array $args       The HTTP arguments.
 * @param null  $arg        The first hook argument. Null since this is a ping.
 * @param int   $webhook_id The webhook ID.
 *
 * @return array
 */
function wp_kama_woocommerce_webhook_http_args_filter( $args, $arg, $webhook_id ){

	// filter...
	return $args;
}
$args(array)
The HTTP arguments.
$arg(null)
The first hook argument. Null since this is a ping.
$webhook_id(int)
The webhook ID.

Changelog

Since 3.3.0 Introduced.

Where the hook is called

WC_Webhook::deliver_ping()
woocommerce_webhook_http_args
WC_Webhook::deliver()
woocommerce_webhook_http_args
woocommerce/includes/class-wc-webhook.php 627
$http_args = apply_filters( 'woocommerce_webhook_http_args', $args, null, $this->get_id() );
woocommerce/includes/class-wc-webhook.php 352
$http_args = apply_filters( 'woocommerce_webhook_http_args', $http_args, $arg, $this->get_id() );

Where the hook is used in WooCommerce

woocommerce/src/Internal/Admin/Agentic/AgenticWebhookManager.php 78
add_filter( 'woocommerce_webhook_http_args', array( $this, 'customize_webhook_http_args' ), 10, 3 );