WC_Tracks_Client::record_pixel( string $pixel )

Synchronously request the pixel.


Description Description


Parameters Parameters

$pixel

(Required) pixel url and query string.


Top ↑

Return Return

(bool) Always returns true.


Top ↑

Source Source

File: includes/tracks/class-wc-tracks-client.php

	public static function record_pixel( $pixel ) {
		// Add the Request Timestamp and URL terminator just before the HTTP request.
		$pixel .= '&_rt=' . self::build_timestamp() . '&_=_';

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

		return true;
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.