Automattic\WooCommerce\Internal\Abilities
AbilitiesTracking::send_event
Queue one event in the batched Tracks client, which sends queued events on shutdown.
Method of the class: AbilitiesTracking{}
No Hooks.
Returns
null. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->send_event( $properties ): void;
- $properties(array<string, mixed>) (required)
- All Tracks properties of the event.
AbilitiesTracking::send_event() AbilitiesTracking::send event code WC 11.3.0
protected function send_event( array $properties ): void {
$user = wp_get_current_user();
// WC_Tracks::record_event() skips the test suite, whose users use the wptests_ table prefix.
if ( $user instanceof \WP_User && 'wptests_capabilities' === $user->cap_key ) {
return;
}
\WC_Tracks_Client::record_event_batched( $properties );
}