Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

@itsmeichigo itsmeichigo commented Jan 18, 2023

Closes: #8668

Description

This PR migrates the product add-ons endpoint to use the REST API with application password authentication. The related mapper has also been updated to parse contents without the data envelope.

Testing instructions

Pre-requisite: install Product Add-on extension to your self-hosted store.

  • Enable the feature flag applicationPasswordAuthenticationForSiteCredentialLogin and build the app.
  • On the prologue screen, select Enter your site address and proceed with the address of your test store.
  • Log in with your site credentials. After the login succeeds, you should be navigated to the home screen.
  • In Xcode console, you should not see any error log regarding product add-ons. If you use Charles Proxy or Proxyman, you should see that the request to wc-product-add-ons/v1/product-add-ons succeeds.

Screenshots

No screenshot since the product endpoints haven't been migrated yet.


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

@itsmeichigo itsmeichigo added type: task An internally driven task. feature: REST API Authenticating requests using application password and using REST API instead of Jetpack tunnel. labels Jan 18, 2023
@itsmeichigo itsmeichigo changed the base branch from trunk to feat/8661-jitm-migration January 18, 2023 03:20
@itsmeichigo itsmeichigo added this to the 12.0 milestone Jan 18, 2023
@itsmeichigo itsmeichigo marked this pull request as ready for review January 18, 2023 03:25
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jan 18, 2023

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8670-dae210f on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@Ecarrion Ecarrion self-assigned this Jan 18, 2023
Copy link
Contributor

@Ecarrion Ecarrion left a comment

Choose a reason for hiding this comment

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

Add-Ons network request succeeded but I'm not able to see the add-ons from an order.

Is that supposed to be fixed later, or is it something the orders API does not support, because it doesn't support it I guess there is no point in migrating this endpoint, does it?

I think this happens because this branch does not support products yet. It would be good to retest, once product support has been added.

Base automatically changed from feat/8661-jitm-migration to trunk January 20, 2023 00:14
@itsmeichigo
Copy link
Contributor Author

Thanks @Ecarrion for the reviews! I merged the migration for products to this branch and can confirm that add-ons are displayed on orders now:

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-01-20.at.08.35.26.mp4

I'm merging this PR to avoid blocking others.

@itsmeichigo itsmeichigo merged commit b926866 into trunk Jan 20, 2023
@itsmeichigo itsmeichigo deleted the feat/8668-product-add-on-migration branch January 20, 2023 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: REST API Authenticating requests using application password and using REST API instead of Jetpack tunnel. type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

REST API: Migrate product add-ons

4 participants