File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
WooCommerce/Classes/ViewRelated/Products/Media Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,10 @@ private extension ProductImagesViewController {
152152 }
153153
154154 @objc func doneButtonTapped( ) {
155+ commitAndDismiss ( )
156+ }
157+
158+ func commitAndDismiss( ) {
155159 onCompletion ( productImages)
156160 }
157161
@@ -216,8 +220,7 @@ private extension ProductImagesViewController {
216220 return
217221 }
218222 uploadMediaAssetToSiteMediaLibrary ( asset: asset)
219- // Commits product image changes automatically.
220- doneButtonTapped ( )
223+ commitAndDismiss ( )
221224 }
222225}
223226
@@ -232,8 +235,7 @@ private extension ProductImagesViewController {
232235 return
233236 }
234237
235- // Commits product image changes automatically.
236- self ? . doneButtonTapped ( )
238+ self ? . commitAndDismiss ( )
237239 }
238240 }
239241 guard assets. isEmpty == false else {
@@ -255,8 +257,7 @@ private extension ProductImagesViewController {
255257 return
256258 }
257259
258- // Commits product image changes automatically.
259- self ? . doneButtonTapped ( )
260+ self ? . commitAndDismiss ( )
260261 }
261262 productImageActionHandler. addSiteMediaLibraryImagesToProduct ( mediaItems: mediaItems)
262263 }
You can’t perform that action at this time.
0 commit comments