File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
WooCommerce/Classes/ViewRelated/Orders/Order Creation/ProductsSection Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,12 @@ struct AddProductToOrder: View {
5454 . wooNavigationBarStyle ( )
5555 }
5656
57+ /// Creates the `ProductRow` for a product, depending on whether the product is variable.
58+ ///
5759 @ViewBuilder private func createProductRow( rowViewModel: ProductRowViewModel ) -> some View {
58- if rowViewModel. numberOfVariations > 0 {
59- NavigationLink {
60- if let addVariationToOrderVM = viewModel. getVariationsViewModel ( for: rowViewModel. productOrVariationID) {
61- AddProductVariationToOrder ( isPresented: $isPresented, viewModel: addVariationToOrderVM)
62- }
63- } label: {
60+ if rowViewModel. numberOfVariations > 0 ,
61+ let addVariationToOrderVM = viewModel. getVariationsViewModel ( for: rowViewModel. productOrVariationID) {
62+ LazyNavigationLink ( destination: AddProductVariationToOrder ( isPresented: $isPresented, viewModel: addVariationToOrderVM) ) {
6463 ProductRow ( viewModel: rowViewModel)
6564 }
6665 } else {
You can’t perform that action at this time.
0 commit comments