Skip to content

Conversation

itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Sep 12, 2025

Closes WOOMOB-1332

Description

This PR removes the default nil value for selectedSite in AlamofireNetwork. It is now required to explicitly decide if network switching should be supported when the network is created.

Network switching is disabled for the following flows:

  • App widget
  • Notification extension
  • Watch app
  • Jetpack setup
  • App password generation
  • App password deletion

For POS flows, since AlamofireNetwork is created separately and there were no clear disagreement on the network switching in p91TBi-dve-p2, I updated all the services to inject selected site and app password support availability to their networks.

Testing steps

  • For the app, you can follow the test plan in pe5sF9-4Am-p2 if you're interested in testing how the network layer works now.
  • For POS, I need help with confirming that all features work correctly when the requests are made directly with remote sites via application passwords. To confirm this:
    • Log in to a Jetpack site with WPCom credentials.
    • Confirm that the app makes direct requests with the site.
    • Confirm that all POS features work correctly.

Testing information

  • Tested alpha build with iPad and card reader M2 and confirmed that POS features use direct requests and payments are successful.
  • Tested development build with iPhone and confirmed app widget, watch app, Jetpack setup, app password generation and deletion works correctly.

Screenshots

N/A


  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@itsmeichigo itsmeichigo added this to the 23.3 milestone Sep 12, 2025
@itsmeichigo itsmeichigo added type: task An internally driven task. feature: core Core work. See "category: tooling" and "category: architecture" labels Sep 12, 2025
@@ -18,9 +20,10 @@ public final class PointOfSaleItemFetchStrategyFactory: PointOfSaleItemFetchStra
private let variationsRemote: ProductVariationsRemote

public init(siteID: Int64,
credentials: Credentials?) {
credentials: Credentials?,
selectedSite: AnyPublisher<JetpackSite?, Never>? = nil) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has nil as the default value to avoid updating all related unit tests.

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 12, 2025

App Icon📲 You can test the changes from this Pull Request in WooCommerce iOS Prototype by scanning the QR code below to install the corresponding build.

App NameWooCommerce iOS Prototype
Build Numberpr16124-d3dd70e
Version23.2
Bundle IDcom.automattic.alpha.woocommerce
Commitd3dd70e
Installation URL3teq9nfl3tc1g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@itsmeichigo itsmeichigo marked this pull request as ready for review September 12, 2025 10:25
@itsmeichigo itsmeichigo requested a review from a team September 12, 2025 10:25
@iamgabrielma iamgabrielma self-assigned this Sep 16, 2025
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@itsmeichigo
Copy link
Contributor Author

itsmeichigo commented Sep 16, 2025

@iamgabrielma I see that you're already reviewing this PR. I just added some changes above to inject app password support availability (from remote feature flag and experimental feature flag) to POS's networks. This PR is ready for a new testing round 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: core Core work. See "category: tooling" and "category: architecture" type: task An internally driven task.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants