Automattic\WooCommerce\Admin\Features\Fulfillments

FulfillmentsTracker::track_fulfillment_tracking_lookup_attempt │ public static │ WC 10.7.0

Track when a tracking number auto-lookup is attempted.

Tracked from: FulfillmentsManager::try_parse_tracking_number(). Measures: Effectiveness of auto-detection. A high failure rate indicates the need to improve carrier detection logic. The url_generated flag checks if a functional tracking URL was constructed (a success requires both provider identification AND URL generation).

Метод класса: FulfillmentsTracker{}

Хуков нет.

Возвращает

void. Ничего (null).

Использование

$result = FulfillmentsTracker::track_fulfillment_tracking_lookup_attempt( $lookup_status, $provider_identified, $url_generated ): void;
$lookup_status(строка) (обязательный)
The lookup result ("success" or "not_found").
$provider_identified(строка) (обязательный)
The standardized carrier name identified (e.g., "usps"). Empty if not found.
$url_generated(true|false)
Whether the system successfully constructed a tracking URL.
По умолчанию: false

Список изменений

С версии 10.7.0 Введена.

Код FulfillmentsTracker::track_fulfillment_tracking_lookup_attempt() WC 11.2.2

public static function track_fulfillment_tracking_lookup_attempt( string $lookup_status, string $provider_identified, bool $url_generated = false ): void {
	WC_Tracks::record_event(
		'fulfillment_tracking_lookup_attempted',
		array(
			'lookup_status'       => $lookup_status,
			'provider_identified' => $provider_identified,
			'url_generated'       => $url_generated,
		)
	);
}