Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Experiments/Experiments/DefaultFeatureFlagService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ public struct DefaultFeatureFlagService: FeatureFlagService {
case .applicationPasswordAuthenticationForSiteCredentialLogin:
// Enable this to test application password authentication (WIP)
return false
case .generateAllVariations:
return buildConfig == .localDeveloper || buildConfig == .alpha
case .productsBulkEditing:
return buildConfig == .localDeveloper || buildConfig == .alpha
case .domainSettings:
Expand Down
4 changes: 0 additions & 4 deletions Experiments/Experiments/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ public enum FeatureFlag: Int {
///
case applicationPasswordAuthenticationForSiteCredentialLogin

/// Allows merchants to create all variations from a single button
///
case generateAllVariations

/// Bulk editing of status and price in products list
///
case productsBulkEditing
Expand Down
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

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

11.8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ final class GenerateAllVariationsUseCase {
onStateChanged(.creating)
self.createVariationsRemotely(for: product, variations: variationsToGenerate) { result in
switch result {
case .success(let generatedVariations):
case .success(let allVariations):

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

case .failure(let error):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ final class GenerateVariationsOptionsPresenter {
/// Displays a bottom sheet allowing the merchant to choose whether to generate one variation or to generate all variations.
///
func presentGenerationOptions(sourceView: UIView, onCompletion: @escaping (_ selectedOption: Option) -> Void) {
guard ServiceLocator.featureFlagService.isFeatureFlagEnabled(.generateAllVariations) else {
return onCompletion(.single)
}

let viewProperties = BottomSheetListSelectorViewProperties(title: Localization.addVariationAction)
let command = GenerateVariationsSelectorCommand(selected: nil) { [analytics, baseViewController] option in
baseViewController.dismiss(animated: true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,7 @@ private extension ProductVariationsViewController {
//
private extension ProductVariationsViewController {
func configureTopStackView() {
let title = featureFlagService.isFeatureFlagEnabled(.generateAllVariations) ? Localization.addVariationAction : Localization.generateVariationAction
addTopButton(title: title,
addTopButton(title: Localization.generateVariationAction,
insets: .init(top: 16, left: 16, bottom: 8, right: 16),
hasBottomBorder: true,
actionSelector: #selector(addButtonTapped),
Expand Down
1 change: 1 addition & 0 deletions Yosemite/Yosemite/Stores/ProductVariationStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ private extension ProductVariationStore {
}

/// Bulk creates the provided array of product variations.
/// Returns all product variations on it's completion block.
///
func createProductVariations(siteID: Int64,
productID: Int64,
Expand Down