Automattic\WooCommerce\Internal\Admin

Analytics::record_refund_double_count_event │ private static │ WC 1.0

Send one of the fix tool's Tracks events. Telemetry failures never stop the fix.

Method of the class: Analytics{}

No Hooks.

Returns

void. Nothing (null).

Usage

$result = Analytics::record_refund_double_count_event( $name, $properties ): void;
$name(string) (required)
Event name after the analytics_refund_double_count_ prefix.
$properties(array) (required)
Event properties.

Analytics::record_refund_double_count_event() code WC 11.3.0

private static function record_refund_double_count_event( string $name, array $properties ): void {
	$properties['order_storage'] = OrderUtil::custom_orders_table_usage_is_enabled() ? 'hpos' : 'cpt';
	$event_name                  = 'analytics_refund_double_count_' . $name;

	try {
		if ( function_exists( 'wc_admin_record_tracks_event' ) ) {
			wc_admin_record_tracks_event( $event_name, $properties );
		}
	} catch ( \Throwable $e ) {
		unset( $e );
	}
}