WordPress at Your Fingertips
function is not described

WC_Tracks_Footer_Pixel::render_tracking_pixels() public WC 1.0

Add events as tracking pixels to page footer.

{} It's a method of the class: WC_Tracks_Footer_Pixel{}

No Hooks.

Return

null. Nothing.

Usage

$WC_Tracks_Footer_Pixel = new WC_Tracks_Footer_Pixel();
$WC_Tracks_Footer_Pixel->render_tracking_pixels();

Code of WC_Tracks_Footer_Pixel::render_tracking_pixels() WC 5.8.0

public function render_tracking_pixels() {
	if ( empty( $this->events ) ) {
		return;
	}

	foreach ( $this->events as $event ) {
		$pixel = $event->build_pixel_url();

		if ( ! $pixel ) {
			continue;
		}

		echo '<img style="position: fixed;" src="', esc_url( $pixel ), '" />';
	}

	$this->events = array();
}