WC_Tracks_Client::record_pixel()public staticWC 1.0

Synchronously request the pixel.

Метод класса: WC_Tracks_Client{}

Хуков нет.

Возвращает

true|false. Always returns true.

Использование

$result = WC_Tracks_Client::record_pixel( $pixel );
$pixel(строка) (обязательный)
pixel url and query string.

Код WC_Tracks_Client::record_pixel() WC 8.7.0

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;
}