We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b9523bd + 0d8432d commit 6918860Copy full SHA for 6918860
WooCommerce/Classes/ViewRelated/Products/Edit Product/ProductFormViewController.swift
@@ -202,6 +202,10 @@ final class ProductFormViewController<ViewModel: ProductFormViewModelProtocol>:
202
// MARK: Product preview action handling
203
204
@objc private func saveDraftAndDisplayProductPreview() {
205
+ if viewModel.formType == .add {
206
+ ServiceLocator.analytics.track(.addProductSaveAsDraftTapped, withProperties: ["product_type": product.productType.rawValue])
207
+ }
208
+
209
guard viewModel.canSaveAsDraft() || viewModel.hasUnsavedChanges() else {
210
displayProductPreview()
211
return
0 commit comments