芝麻web文件管理V1.00
编辑当前文件:/var/www/cognitio.in/wp-content/plugins/woocommerce/includes/tracks/class-wc-tracks-footer-pixel.php
add_event( $event ); return true; } /** * Add a Tracks event to the queue. * * @param WC_Tracks_Event $event Event to track. */ public function add_event( $event ) { $this->events[] = $event; } /** * Add events as tracking pixels to page footer. */ public function render_tracking_pixels() { if ( empty( $this->events ) ) { return; } foreach ( $this->events as $event ) { $pixel = $event->build_pixel_url(); if ( ! $pixel ) { continue; } echo '
'; } $this->events = array(); } /** * Fire off API calls for events that weren't converted to pixels. * * This handles wp_redirect(). */ public function send_tracks_requests() { if ( empty( $this->events ) ) { return; } foreach ( $this->events as $event ) { WC_Tracks_Client::record_event( $event ); } } /** * Get all events. */ public static function get_events() { return self::instance()->events; } /** * Clear all queued events. */ public static function clear_events() { self::instance()->events = array(); } }