Skip to content

Commit d37ac85

Browse files
committed
Add linked products promo experiment
1 parent 7c3d2d7 commit d37ac85

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Experiments/Experiments/ABTest.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ public enum ABTest: String, CaseIterable {
1616
/// Experiment ref: pbxNRc-1S0-p2
1717
case aaTestLoggedOut202208 = "woocommerceios_explat_aa_test_logged_out_202208"
1818

19+
/// A/B test for promoting linked products in Product Details.
20+
/// Experiment ref: pbxNRc-1Pp-p2
21+
case linkedProductsPromo = "woocommerceios_product_details_linked_products_banner"
22+
1923
/// Returns a variation for the given experiment
2024
public var variation: Variation {
2125
ExPlat.shared?.experiment(rawValue) ?? .control

WooCommerce/Classes/ViewRelated/Products/Edit Product/ProductFormActionsFactory.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Yosemite
2+
import Experiments
23

34
/// Edit actions in the product form. Each action allows the user to edit a subset of product properties.
45
enum ProductFormEditAction: Equatable {
@@ -77,6 +78,7 @@ struct ProductFormActionsFactory: ProductFormActionsFactoryProtocol {
7778

7879
let newLinkedProductsPromoViewModel = linkedProductsPromoViewModel
7980
let shouldShowLinkedProductsPromo = ServiceLocator.featureFlagService.isFeatureFlagEnabled(.linkedProductsPromo)
81+
&& ABTest.linkedProductsPromo.variation == .treatment(nil)
8082
&& isLinkedProductsPromoEnabled
8183
&& newLinkedProductsPromoViewModel.shouldBeVisible
8284
&& product.upsellIDs.isEmpty

0 commit comments

Comments
 (0)