Skip to content

Commit 51d0fac

Browse files
authored
Merge pull request #8619 from woocommerce/issue/8494-remove-feature-flag
Variations: Remove feature flag
2 parents b1e3bf3 + 6fd8a1a commit 51d0fac

File tree

7 files changed

+5
-14
lines changed

7 files changed

+5
-14
lines changed

Experiments/Experiments/DefaultFeatureFlagService.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
6060
case .applicationPasswordAuthenticationForSiteCredentialLogin:
6161
// Enable this to test application password authentication (WIP)
6262
return false
63-
case .generateAllVariations:
64-
return buildConfig == .localDeveloper || buildConfig == .alpha
6563
case .productsBulkEditing:
6664
return buildConfig == .localDeveloper || buildConfig == .alpha
6765
case .domainSettings:

Experiments/Experiments/FeatureFlag.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,6 @@ public enum FeatureFlag: Int {
142142
///
143143
case applicationPasswordAuthenticationForSiteCredentialLogin
144144

145-
/// Allows merchants to create all variations from a single button
146-
///
147-
case generateAllVariations
148-
149145
/// Bulk editing of status and price in products list
150146
///
151147
case productsBulkEditing

RELEASE-NOTES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
11.9
44
-----
5+
- [**] Now you can generate all possible variations for a product's attributes [https://github.com/woocommerce/woocommerce-ios/pull/8619]
56
- [*] Mobile payments: fixed card reader manuals links. [https://github.com/woocommerce/woocommerce-ios/pull/8628]
67

78
11.8

WooCommerce/Classes/ViewRelated/Products/Variations/GenerateAllVariationsUseCase.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ final class GenerateAllVariationsUseCase {
5858
onStateChanged(.creating)
5959
self.createVariationsRemotely(for: product, variations: variationsToGenerate) { result in
6060
switch result {
61-
case .success(let generatedVariations):
61+
case .success(let allVariations):
6262

6363
// Updates the current product with the up-to-date list of variations IDs.
6464
// This is needed in order to reflect variations count changes back to other screens.
65-
let updatedProduct = product.copy(variations: product.variations + generatedVariations.map { $0.productVariationID })
65+
let updatedProduct = product.copy(variations: allVariations.map { $0.productVariationID })
6666
onStateChanged(.finished(true, updatedProduct))
6767

6868
case .failure(let error):

WooCommerce/Classes/ViewRelated/Products/Variations/GenerateVariationsOptionPresenter.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ final class GenerateVariationsOptionsPresenter {
2828
/// Displays a bottom sheet allowing the merchant to choose whether to generate one variation or to generate all variations.
2929
///
3030
func presentGenerationOptions(sourceView: UIView, onCompletion: @escaping (_ selectedOption: Option) -> Void) {
31-
guard ServiceLocator.featureFlagService.isFeatureFlagEnabled(.generateAllVariations) else {
32-
return onCompletion(.single)
33-
}
34-
3531
let viewProperties = BottomSheetListSelectorViewProperties(title: Localization.addVariationAction)
3632
let command = GenerateVariationsSelectorCommand(selected: nil) { [analytics, baseViewController] option in
3733
baseViewController.dismiss(animated: true)

WooCommerce/Classes/ViewRelated/Products/Variations/ProductVariationsViewController.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,7 @@ private extension ProductVariationsViewController {
284284
//
285285
private extension ProductVariationsViewController {
286286
func configureTopStackView() {
287-
let title = featureFlagService.isFeatureFlagEnabled(.generateAllVariations) ? Localization.addVariationAction : Localization.generateVariationAction
288-
addTopButton(title: title,
287+
addTopButton(title: Localization.generateVariationAction,
289288
insets: .init(top: 16, left: 16, bottom: 8, right: 16),
290289
hasBottomBorder: true,
291290
actionSelector: #selector(addButtonTapped),

Yosemite/Yosemite/Stores/ProductVariationStore.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ private extension ProductVariationStore {
168168
}
169169

170170
/// Bulk creates the provided array of product variations.
171+
/// Returns all product variations on it's completion block.
171172
///
172173
func createProductVariations(siteID: Int64,
173174
productID: Int64,

0 commit comments

Comments
 (0)