Skip to content

Commit 7e4f77b

Browse files
authored
Merge pull request #7790 from woocommerce/issue/6562-bulk-success-notices
Bulk Prices: Added success notice with bulk updating variation prices
2 parents ffc1234 + 9e2f16b commit 7e4f77b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

WooCommerce/Classes/ViewRelated/Products/Variations/Bulk Update/BulkUpdateViewController.swift

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,12 +128,21 @@ final class BulkUpdateViewController: UIViewController, GhostableViewController
128128
noticePresenter.enqueue(notice: notice)
129129
}
130130

131+
/// Displays the success price update `Notice`.
132+
///
133+
private func displayPriceUpdatedNotice() {
134+
let title = Localization.pricesUpdated
135+
let notice = Notice(title: title, feedbackType: .success)
136+
noticePresenter.enqueue(notice: notice)
137+
}
138+
131139
/// Called when the price option is selected
132140
///
133141
private func navigateToEditPriceSettings() {
134142
let bulkUpdatePriceSettingsViewModel = viewModel.viewModelForBulkUpdatePriceOfType(.regular, priceUpdateDidFinish: { [weak self] in
135143
guard let self = self else { return }
136144
self.navigationController?.popToViewController(self, animated: true)
145+
self.displayPriceUpdatedNotice()
137146
})
138147
let viewController = BulkUpdatePriceViewController(viewModel: bulkUpdatePriceSettingsViewModel)
139148
show(viewController, sender: nil)
@@ -256,6 +265,8 @@ private extension BulkUpdateViewController {
256265
static let noticeUnableToSyncVariations = NSLocalizedString("Unable to retrieve variations",
257266
comment: "Unable to retrieve variations for bulk update screen")
258267
static let noticeRetryAction = NSLocalizedString("Retry", comment: "Retry Action")
268+
static let pricesUpdated = NSLocalizedString("Prices updated successfully.",
269+
comment: "Notice title when updating the price via the bulk variation screen")
259270
}
260271
}
261272

0 commit comments

Comments
 (0)