diff --git a/WooCommerce/Classes/ViewRelated/Hub Menu/HubMenu.swift b/WooCommerce/Classes/ViewRelated/Hub Menu/HubMenu.swift index e958ac7a121..947bf635881 100644 --- a/WooCommerce/Classes/ViewRelated/Hub Menu/HubMenu.swift +++ b/WooCommerce/Classes/ViewRelated/Hub Menu/HubMenu.swift @@ -113,7 +113,7 @@ struct HubMenu: View { NavigationLink(destination: CouponListView(siteID: viewModel.siteID), isActive: $showingCoupons) { EmptyView() }.hidden() - NavigationLink(destination: InAppPurchasesDebugView(), isActive: $showingIAPDebug) { + NavigationLink(destination: InAppPurchasesDebugView(siteID: viewModel.siteID), isActive: $showingIAPDebug) { EmptyView() }.hidden() LazyNavigationLink(destination: viewModel.getReviewDetailDestination(), isActive: $viewModel.showingReviewDetail) { diff --git a/WooCommerce/Classes/ViewRelated/InAppPurchases/InAppPurchasesDebugView.swift b/WooCommerce/Classes/ViewRelated/InAppPurchases/InAppPurchasesDebugView.swift index a4ac1ebd0e3..d2447c83204 100644 --- a/WooCommerce/Classes/ViewRelated/InAppPurchases/InAppPurchasesDebugView.swift +++ b/WooCommerce/Classes/ViewRelated/InAppPurchases/InAppPurchasesDebugView.swift @@ -3,6 +3,7 @@ import StoreKit import Yosemite struct InAppPurchasesDebugView: View { + let siteID: Int64 private let stores = ServiceLocator.stores @State var products: [StoreKit.Product] = [] @@ -19,7 +20,7 @@ struct InAppPurchasesDebugView: View { } else { ForEach(products) { product in Button(product.description) { - stores.dispatch(InAppPurchaseAction.purchaseProduct(siteID: 0, product: product, completion: { _ in })) + stores.dispatch(InAppPurchaseAction.purchaseProduct(siteID: siteID, product: product, completion: { _ in })) } } } @@ -45,6 +46,6 @@ struct InAppPurchasesDebugView: View { struct InAppPurchasesDebugView_Previews: PreviewProvider { static var previews: some View { - InAppPurchasesDebugView() + InAppPurchasesDebugView(siteID: 0) } }