File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
WooCommerce/Classes/Authentication/Store Creation/Plan Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,19 @@ struct MockInAppPurchases {
1515 private let fetchProductsDuration : UInt64
1616 private let products : [ WPComPlanProduct ]
1717 private let userIsEntitledToProduct : Bool
18+ private let isIAPSupported : Bool
1819
1920 /// - Parameter fetchProductsDuration: How long to wait until the mock plan is returned, in nanoseconds.
2021 /// - Parameter products: WPCOM products to return for purchase.
2122 /// - Parameter userIsEntitledToProduct: Whether the user is entitled to the matched IAP product.
2223 init ( fetchProductsDuration: UInt64 = 1_000_000_000 ,
2324 products: [ WPComPlanProduct ] = Defaults . products,
24- userIsEntitledToProduct: Bool = false ) {
25+ userIsEntitledToProduct: Bool = false ,
26+ isIAPSupported: Bool = true ) {
2527 self . fetchProductsDuration = fetchProductsDuration
2628 self . products = products
2729 self . userIsEntitledToProduct = userIsEntitledToProduct
30+ self . isIAPSupported = isIAPSupported
2831 }
2932}
3033
@@ -48,7 +51,7 @@ extension MockInAppPurchases: InAppPurchasesForWPComPlansProtocol {
4851 }
4952
5053 func inAppPurchasesAreSupported( ) async -> Bool {
51- true
54+ isIAPSupported
5255 }
5356}
5457
You can’t perform that action at this time.
0 commit comments