Automattic\WooCommerce\Admin\Features\Fulfillments
FulfillmentsTracker::track_fulfillment_notification_sent
Track when a fulfillment notification email is successfully queued to a customer.
Tracked from: OrderFulfillmentsRestController (create, update, and delete flows). Measures: Whether the communication loop is being closed; how often merchants notify customers.
Method of the class: FulfillmentsTracker{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = FulfillmentsTracker::track_fulfillment_notification_sent( $trigger_action, $fulfillment_id, $order_id ): void;
- $trigger_action(string) (required)
- The action that triggered the notification ("fulfillment_created", "fulfillment_updated", or "fulfillment_deleted").
- $fulfillment_id(int) (required)
- The ID of the fulfillment.
- $order_id(int) (required)
- The ID of the associated order.
Changelog
| Since 10.7.0 | Introduced. |
FulfillmentsTracker::track_fulfillment_notification_sent() FulfillmentsTracker::track fulfillment notification sent code WC 10.7.0
public static function track_fulfillment_notification_sent( string $trigger_action, int $fulfillment_id, int $order_id ): void {
WC_Tracks::record_event(
'fulfillment_notification_sent',
array(
'trigger_action' => $trigger_action,
'fulfillment_id' => $fulfillment_id,
'order_id' => $order_id,
)
);
}