-
Notifications
You must be signed in to change notification settings - Fork 219
Add order and checkout order endpoint documentation #11157
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: 0 B Total Size: 1.48 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, @hsingyuc. While I haven't done a full review yet, I already wanted to share a few things I noticed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs checks out! Thank you for working on this @hsingyuc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've spotted one more minor thing that we should adjust.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found one more thing to adjust and while looking at src/StoreApi/docs/order.md
, I was wondering if we should flip the sections Responses
and Get Order
? That way, the example on how to get the order is visible immediately. What are your thoughts on that, @hsingyuc?
src/StoreApi/README.md
Outdated
| [`Checkout`](docs/checkout.md) | `GET`, `POST` | [`/wc/store/v1/checkout`](docs/checkout.md) | | ||
| [`Checkout`](docs/checkout.md) | `GET`, `POST` | [`/wc/store/v1/checkout`](docs/checkout.md) | ||
| [`Checkout order`](docs/checkout-order.md) | `POST` | [`/wc/store/v1/checkout`](docs/checkout-order.md) | | ||
| [`Order`](docs/order.md) | `GET` | [`/wc/store/v1/order`](docs/order.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| [`Order`](docs/order.md) | `GET` | [`/wc/store/v1/order`](docs/order.md) | |
| [`Order`](docs/order.md) | `GET` | [`/wc/store/v1/order/:id`](docs/order.md) |
I noticed that for the order endpoint, the path parameter :id
is also missing. Similar to the checkout order endpoint, we should mention that path parameter here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nielslange Good catch! Updated all the above comments here d8c1eee. Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if we should flip the sections Responses and Get Order? That way, the example on how to get the order is visible immediately.
I updated this part, but I want to mention that I followed the cart endpoint. Should we also update the cart endpoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nielslange Good catch! Updated all the above comments here d8c1eee. Thank you!
Thank you for addressing all the suggestions so promptly, @hsingyuc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[...] I want to mention that I followed the cart endpoint. Should we also update the cart endpoint?
Good catch, @hsingyuc. If you can update the cart endpoint, that'd be helpful.
Additionally, I observed a duplicate TOC in src/StoreApi/docs/checkout.md. Though unrelated to your PR, it'd be great if you could address that too.
However, since these suggestions aren't directly related to your current PR, I've approved it. You can merge now or make my recommended changes first, if possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated cart endpoint doc here a6ea7a2
ffda7ef
to
d8c1eee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this and applying the suggestions, @hsingyuc. While I left some feedback in #11157 (comment), I'm approving this PR. 🙌
What
Fixes #
Why
Adds documentation for the order and checkout order endpoints since the feature flag is being removed.
Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
Screenshots or screencast
WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog