Automattic\WooCommerce\Admin\Features\Fulfillments
FulfillmentsTracker::track_fulfillment_validation_error
Track when a fulfillment action fails due to a validation error.
Tracked from: OrderFulfillmentsRestController (create, update, and delete flows). Measures: Where users encounter errors; helps proactively identify bugs and UX problems.
Method of the class: FulfillmentsTracker{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = FulfillmentsTracker::track_fulfillment_validation_error( $action_attempted, $error_code, $source ): void;
- $action_attempted(string) (required)
- The action that was attempted ("create", "update", "delete", or "fulfill").
- $error_code(string) (required)
- The error code from the exception.
- $source(string) (required)
- The source of the error ("fulfillments_modal", "bulk_action", or "api").
Changelog
| Since 10.7.0 | Introduced. |
FulfillmentsTracker::track_fulfillment_validation_error() FulfillmentsTracker::track fulfillment validation error code WC 10.8.1
public static function track_fulfillment_validation_error( string $action_attempted, string $error_code, string $source ): void {
WC_Tracks::record_event(
'fulfillment_validation_error',
array(
'action_attempted' => $action_attempted,
'error_code' => $error_code,
'source' => $source,
)
);
}