File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
WooCommerce/Classes/ViewRelated/CardPresentPayments Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -308,7 +308,17 @@ private extension CardReaderConnectionController {
308308 return
309309 }
310310
311- /// If we enter this state and we already have found readers
311+ /// If we enter this state and another reader was discovered while the
312+ /// "Do you want to connect to" modal was being displayed and if that reader
313+ /// is known and the merchant tapped keep searching on the first
314+ /// (unknown) reader, auto-connect to that known reader
315+ if self . getFoundKnownReaders ( ) . isNotEmpty {
316+ self . candidateReader = self . getFoundKnownReaders ( ) . first
317+ self . state = . connectToReader
318+ return
319+ }
320+
321+ /// If we already have found readers
312322 /// display the list view if so enabled, or...
313323 ///
314324 if showSeveralFoundReaders {
@@ -325,7 +335,8 @@ private extension CardReaderConnectionController {
325335 return
326336 }
327337
328- /// Otherwise, display the "scanning" modal
338+ /// If all else fails, display the "scanning" modal and
339+ /// stay in this state
329340 ///
330341 alerts. scanningForReader ( from: from, cancel: {
331342 self . state = . cancel
You can’t perform that action at this time.
0 commit comments