WC_Tracks_Client::record_pixelpublic staticWC 1.0

Synchronously request the pixel.

Method of the class: WC_Tracks_Client{}

No Hooks.

Returns

true|false. Always returns true.

Usage

$result = WC_Tracks_Client::record_pixel( $pixel );
$pixel(string) (required)
pixel url and query string.

WC_Tracks_Client::record_pixel() code WC 9.9.4

public static function record_pixel( $pixel ) {
	// Add the Request Timestamp and no cache parameter just before the HTTP request.
	$pixel = self::add_request_timestamp_and_nocache( $pixel );

	wp_safe_remote_get(
		$pixel,
		array(
			'blocking'    => false,
			'redirection' => 2,
			'httpversion' => '1.1',
			'timeout'     => 1,
		)
	);

	return true;
}