Automattic\WooCommerce\Admin\Features\Fulfillments

FulfillmentsTracker::track_fulfillment_creation │ public static │ WC 10.7.0

Track when a new fulfillment is successfully saved.

Tracked from: OrderFulfillmentsRestController::create_fulfillment(). Measures: Core adoption; whether merchants create full vs. partial shipments.

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

Хуков нет.

Возвращает

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

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

$result = FulfillmentsTracker::track_fulfillment_creation( $source, $initial_status, $fulfillment_type, $item_count, $total_quantity, $notification_sent ): void;
$source(строка) (обязательный)
The source of the fulfillment ("fulfillments_modal", "bulk_action", or "api").
$initial_status(строка) (обязательный)
The initial status of the fulfillment ("draft" or "fulfilled").
$fulfillment_type(строка) (обязательный)
Whether all remaining items were included ("full" or "partial").
$item_count(int) (обязательный)
Total quantity of items in the fulfillment (sum of item quantities).
$total_quantity(int) (обязательный)
Total quantity of all items in the order.
$notification_sent(true|false) (обязательный)
Whether the customer notification was requested.

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

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

Код FulfillmentsTracker::track_fulfillment_creation() WC 11.2.2

public static function track_fulfillment_creation( string $source, string $initial_status, string $fulfillment_type, int $item_count, int $total_quantity, bool $notification_sent ): void {
	WC_Tracks::record_event(
		'fulfillment_created',
		array(
			'source'            => $source,
			'initial_status'    => $initial_status,
			'fulfillment_type'  => $fulfillment_type,
			'item_count'        => $item_count,
			'total_quantity'    => $total_quantity,
			'notification_sent' => $notification_sent,
		)
	);
}