File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
WooCommerce/Classes/ViewRelated/Products/Edit Product Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ extension ProductFormViewController {
8484 // MARK: - Progress
8585
8686 /// Progress view for save action.
87+ ///
8788 func showSavingProgress( _ messageType: SaveMessageType ) {
8889 switch messageType {
8990 case . publish:
Original file line number Diff line number Diff line change @@ -617,7 +617,15 @@ private extension ProductFormViewController {
617617//
618618private extension ProductFormViewController {
619619 func saveProduct( status: ProductStatus ? = nil ) {
620- let productStatus = status ?? product. status
620+ var productStatus = status ?? product. status
621+
622+ // Set productStatus to custom type for saving a variation
623+ // This will change Progress view title and message for variation save action.
624+ // Fix for the issue: https://github.com/woocommerce/woocommerce-ios/issues/4847
625+ if let _ = self . viewModel. productionVariationID {
626+ productStatus = . custom( " variation " )
627+ }
628+
621629 let messageType = viewModel. saveMessageType ( for: productStatus)
622630 showSavingProgress ( messageType)
623631 saveImagesAndProductRemotely ( status: status)
Original file line number Diff line number Diff line change @@ -153,6 +153,7 @@ extension ProductFormViewModelProtocol {
153153
154154 /// Returns `.publish` when the product does not exists remotely and it's gonna be published for the first time.
155155 /// Returns `.publish` when the product is going to be published from a different status (eg: from draft).
156+ /// Returns `.saveVariation` when saving a variation
156157 /// Returns `.save` for any other case.
157158 ///
158159 func saveMessageType( for productStatus: ProductStatus ) -> SaveMessageType {
You can’t perform that action at this time.
0 commit comments