Automattic\WooCommerce\Internal\Abilities
AbilitiesTracking::send_event
Queue one event in the batched Tracks client, which sends queued events on shutdown.
Метод класса: AbilitiesTracking{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->send_event( $properties ): void;
- $properties(array<string, mixed>) (обязательный)
- All Tracks properties of the event.
Код AbilitiesTracking::send_event() AbilitiesTracking::send event 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 );
}