WC_Tracks_Client::record_pixel()
Synchronously request the pixel.
Method of the class: WC_Tracks_Client{}
No Hooks.
Return
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() WC Tracks Client::record pixel code WC 7.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; }