Skip to content
Merged
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [*] Increased decimal sensitivity in order creation to mitigate tax rounding issues [https://github.com/woocommerce/woocommerce-ios/pull/15957]
- [*] Fix initialization of authenticator to avoid crashes during login [https://github.com/woocommerce/woocommerce-ios/pull/15953]
- [*] Shipping Labels: Made HS tariff number field required in customs form for EU destinations [https://github.com/woocommerce/woocommerce-ios/pull/15946]
- [*] Order Creation: Prevent subscription products to be added to an order [https://github.com/woocommerce/woocommerce-ios/pull/15960]
- [internal] Replace COTS_DEVICE reader model name with TAP_TO_PAY_DEVICE. [https://github.com/woocommerce/woocommerce-ios/pull/15961]

22.9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,16 +216,21 @@ struct ProductSelectorView: View {
ProductRow(multipleSelectionsEnabled: true,
viewModel: rowViewModel,
onCheckboxSelected: {
viewModel.variationCheckboxTapped(for: rowViewModel.productOrVariationID)
if rowViewModel.selectionEnabled {
viewModel.variationCheckboxTapped(for: rowViewModel.productOrVariationID)
}
})
.frame(maxWidth: .infinity, alignment: .leading)
.onTapGesture {
viewModel.variationRowTapped(for: rowViewModel.productOrVariationID)
if rowViewModel.selectionEnabled {
viewModel.variationRowTapped(for: rowViewModel.productOrVariationID)
}
}
.redacted(reason: viewModel.showPlaceholders ? .placeholder : [])
.disabled(viewModel.selectionDisabled)

DisclosureIndicator()
.renderedIf(rowViewModel.selectionEnabled)
}
.accessibilityHint(configuration.variableProductRowAccessibilityHint)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,8 @@ private extension ProductSelectorViewModel {
switch (source, product.productType, product.variations) {
case (.orderForm, .booking, _):
return .unsupported(reason: Localization.bookableProductUnsupportedReason)
case (.orderForm, .subscription, _), (.orderForm, .variableSubscription, _):
return .unsupported(reason: Localization.subscriptionProductUnsupportedReason)
case (_, _, let variations) where variations.isEmpty:
return selectedItemsIDs.contains(product.productID) ? .selected : .notSelected
default:
Expand Down Expand Up @@ -981,6 +983,11 @@ private extension ProductSelectorViewModel {
value: "Bookable products are not supported for order creation",
comment: "Message explaining unsupported bookable products for order creation"
)
static let subscriptionProductUnsupportedReason = NSLocalizedString(
"productSelectorViewModel.subscriptionProductUnsupportedReason",
value: "Subscription products are not supported for order creation",
comment: "Message explaining unsupported subscription products for order creation"
)
}
}

Expand Down