Skip to content

Conversation

@itsmeichigo
Copy link
Contributor

Closes: #8668

Description

This PR enables REST API for all shipping label endpoints and updates the related mappers to parse contents without the data envelope.

My apologies for the size of this PR - most of the changes are for the mock responses.

Testing instructions

Pre-requisite: Follow the testing guide for setting up shipping label on your self-hosted site: p91TBi-3xD-pp91TBi-3xD2-p2. Then create an order on your store and handle the payment to make it eligible for creating shipping labels.

  • 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.
  • Switch to the Orders tab and select the created order. Notice that the button Create shipping label is visible on the order detail screen.
  • Tap the Create shipping label button to start the creation. Follow the steps to purchase a label. Everything should work properly (the package selection screen will not display the purchased product since the product endpoints haven't been migrated yet).
  • After purchasing a label, navigate back to the Order details screen. The purchased label should be listed on the screen, and you should be able to print it or request a refund.

Screenshots

Simulator.Screen.Recording.-.iPhone.14.Pro.-.2023-01-18.at.12.53.56.mp4

  • 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 added this to the 12.0 milestone Jan 18, 2023
@peril-woocommerce
Copy link

peril-woocommerce bot commented Jan 18, 2023

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 2 days Please, make sure to get it merged by then or assign it to a later expiring milestone
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@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 pr8676-c3f49c3 on your iPhone

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

@jaclync jaclync self-assigned this Jan 19, 2023
Copy link
Contributor

@jaclync jaclync left a comment

Choose a reason for hiding this comment

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

Works as expected :shipit: the products of the shipping label aren't shown in order details, I assume it's because the products endpoint hasn't been converted.

Base automatically changed from feat/8668-product-add-on-migration to trunk January 20, 2023 01:37
@itsmeichigo
Copy link
Contributor Author

the products of the shipping label aren't shown in order details, I assume it's because the products endpoint hasn't been converted.

I merged the migration of products back to this branch and can confirm that product items can now be displayed on the package detail screen:

@itsmeichigo itsmeichigo enabled auto-merge January 20, 2023 01:44
@itsmeichigo itsmeichigo merged commit 81a0826 into trunk Jan 20, 2023
@itsmeichigo itsmeichigo deleted the feat/8671-shipping-label-migration branch January 20, 2023 02:28
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