Skip to content

Conversation

@adborbas
Copy link
Contributor

@adborbas adborbas commented Oct 24, 2025

Closes WOOMOB-1529

Description

Force https scheme for siteAddress.

The fix ensures that when creating a JetpackSite from a Site, the URL always uses the https scheme. This logic lives in a small private extension (jetpackCanonicalURL), which felt like the right place since it’s well-contained and only runs once (or at most a few times).

I considered a more elaborate approach using a request retrier that would detect ATS failures, retry with https, and persist that preference on the Site for future requests. However, that felt overly complex for such rare cases, so I opted for this simpler and more predictable solution.

Steps to reproduce

This one is a bit tricky as it requires fiddling with the site settings in NetworkAdmin, so instead I'd suggest mocking a network response in ProxyMan.

  1. Start on trunk branch. Build and launch the app locally while connected to Proxyman or any other network monitoring tool.
  2. Look for the https://public-api.wordpress.com/rest/v1.1/me/sites?... request. Which should contain a response object
    {
      "sites": [
        {
          "ID": 000000000,
          "name": "Buy cheap stuff expensive",
          "description": "",
          "URL": "https://<your-site>.com",
  3. Set up a local map for that request and mock the URL property to use httpinstead of https. So turn
    "URL": "https://<your-site>.com" ->  "URL": "http://<your-site>.com"
    
  4. Force close the app.
  5. Start the app.
  6. Note that bookings do not load. This verifies that trunk is broken.
  7. Check out this branch.
    git checkout adborbas/woomob-1529
  8. Start the app.
  9. Note bookings load without an issue.

Testing information

Tested with iPhone 17 Pro iOS 26 on both simulator and device.

Screenshots

Before After
Simulator Screen Recording - iPhone 17 Pro - 2025-10-24 at 12 48 40 Simulator Screen Recording - iPhone 17 Pro - 2025-10-24 at 12 49 46

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

@adborbas adborbas added this to the 23.6 milestone Oct 24, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 24, 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 Numberpr16279-7adf54f
Version23.5
Bundle IDcom.automattic.alpha.woocommerce
Commit7adf54f
Installation URL3nfv1ta3f2u60
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@adborbas adborbas marked this pull request as ready for review October 24, 2025 11:23
@adborbas adborbas force-pushed the adborbas/woomob-1529 branch from 0af580e to 7adf54f Compare October 27, 2025 07:28
@adborbas adborbas added the type: bug A confirmed bug. label Oct 27, 2025
@RafaelKayumov RafaelKayumov self-assigned this Oct 27, 2025
Copy link
Contributor

@RafaelKayumov RafaelKayumov left a comment

Choose a reason for hiding this comment

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

Hey @adborbas, Thx for the fix.
I'm not sure how to follow these testing steps:

Could you please describe what to do there in detail?

@adborbas
Copy link
Contributor Author

@RafaelKayumov I've updated the steps. Could you please see them again? Please let me know if they need more adjustments.

@RafaelKayumov RafaelKayumov self-requested a review October 27, 2025 14:54
Copy link
Contributor

@RafaelKayumov RafaelKayumov left a comment

Choose a reason for hiding this comment

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

On my side I had to open sites selected to trigger the sites request that delivers the URL parameter.

LGTM. Works as described.

@adborbas adborbas merged commit 73cb7b0 into trunk Oct 28, 2025
18 checks passed
@adborbas adborbas deleted the adborbas/woomob-1529 branch October 28, 2025 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A confirmed bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants