File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
WooCommerce/Classes/ViewRelated/Products/Edit Product Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -629,13 +629,6 @@ extension ProductFormViewModel {
629629 }
630630 }
631631
632- func hasChangesExcludingImageUploads( ) -> Bool {
633- let hasProductChanges = product. product. copy ( images: [ ] ) != originalProduct. product. copy ( images: [ ] )
634- let hasUploadedImageChanges = product. images. map ( \. imageID) != originalProduct. images. map ( \. imageID)
635- return hasProductChanges || hasUploadedImageChanges || password != originalPassword || isNewTemplateProduct ( )
636-
637- }
638-
639632 func duplicateProduct( onCompletion: @escaping ( Result < ProductModel , ProductUpdateError > ) -> Void ) {
640633
641634 remoteActionUseCase. duplicateProduct ( originalProduct: product,
@@ -668,6 +661,14 @@ extension ProductFormViewModel {
668661// MARK: Background image upload
669662//
670663private extension ProductFormViewModel {
664+
665+ func hasChangesExcludingImageUploads( ) -> Bool {
666+ let hasProductChanges = product. product. copy ( images: [ ] ) != originalProduct. product. copy ( images: [ ] )
667+ let hasUploadedImageChanges = product. images. map ( \. imageID) != originalProduct. images. map ( \. imageID)
668+ return hasProductChanges || hasUploadedImageChanges || password != originalPassword || isNewTemplateProduct ( )
669+
670+ }
671+
671672 func replaceProductID( productIDBeforeSave: Int64 ) {
672673 productImagesUploader. replaceLocalID ( siteID: product. siteID,
673674 localID: . product( id: productIDBeforeSave) ,
You can’t perform that action at this time.
0 commit comments