Automattic\WooCommerce\Internal\Abilities
AbilitiesTracking::handle_shutdown
Handle the shutdown action: record calls that never finished, then send the queued events.
Method of the class: AbilitiesTracking{}
No Hooks.
Returns
null. Nothing (null).
Usage
$AbilitiesTracking = new AbilitiesTracking(); $AbilitiesTracking->handle_shutdown(): void;
AbilitiesTracking::handle_shutdown() AbilitiesTracking::handle shutdown code WC 11.3.0
public function handle_shutdown(): void {
while ( $this->frames ) {
$this->add_event( array_pop( $this->frames ), null, false );
}
if ( ! $this->events ) {
return;
}
$this->flush_events();
// This runs after WC_Tracks_Client's own send at priority 20, so the queued pixels are sent here.
try {
$this->send_queued_pixels();
} catch ( \Throwable $e ) {
unset( $e );
}
}