File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
WooCommerce/Classes/ViewRelated/Orders/Order Creation Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -526,6 +526,7 @@ private extension NewOrderViewModel {
526526 switch state {
527527 case . error( let error) :
528528 DDLogError ( " ⛔️ Error syncing new order remotely: \( error) " )
529+ self . trackSyncOrderFailure ( error: error)
529530 return NoticeFactory . syncOrderErrorNotice ( error, with: self . orderSynchronizer)
530531 default :
531532 return nil
@@ -689,6 +690,13 @@ private extension NewOrderViewModel {
689690 errorDescription: error. localizedDescription) )
690691 }
691692
693+ /// Tracks an order remote sync failure
694+ ///
695+ func trackSyncOrderFailure( error: Error ) {
696+ analytics. track ( event: WooAnalyticsEvent . Orders. orderSyncFailed ( errorContext: String ( describing: error) ,
697+ errorDescription: error. localizedDescription) )
698+ }
699+
692700 /// Creates an `OrderSyncAddressesInput` type from a `NewOrderAddressData` type.
693701 /// Expects `billing` and `shipping` addresses to exists together,
694702 ///
You can’t perform that action at this time.
0 commit comments