This repository was archived by the owner on Feb 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 215
Checkout order and Order endpoints don't support extensions endpoint and aren't backward compatible. #11197
Copy link
Copy link
Open
Labels
block: checkoutIssues related to the checkout block.Issues related to the checkout block.category: extensibilityWork involving adding or updating extensibility. Useful to combine with other scopes impacted.Work involving adding or updating extensibility. Useful to combine with other scopes impacted.focus: checkoutIssues related to the checkout flowIssues related to the checkout flowfocus: rest apiWork impacting REST api routes.Work impacting REST api routes.status: staleStale issues and PRs have had no updates for 60 days.Stale issues and PRs have had no updates for 60 days.team: Rubiktype: enhancementThe issue is a request for an enhancement.The issue is a request for an enhancement.
Description
Recently introduced Checkout Order and Orders don't contain extensions fields and/or are not compatible with existing extensions.
Checkout order
- This is a POST only endpoint that allows you pay for existing orders, it already has an extensions key (by inheriting the
CheckoutSchemaclass) but the key ischeckout-orderinstead ofcheckout. This means plugins relying on pushing data with checkout POST requests will not work as they're waiting atcheckoutkey.
Orders
- This is a GET endpoint that will return an array of Cart-shaped pending orders. It doesn't include an extensions key, so it can't be extended, and existing plugins that extend Cart can't append data to it, meaning it will surface missing information (for things like Subscriptions and such).
Expected solutions
- Add an extensions key
Ordersendpoint. - Add backward compatibility to Checkout Orders endpoint so that it uses whatever is registered in
checkout, but only if nothing is registered incheckout-order. This will probably require some tweaking from our ExtendSchema class. - Add the same backward compatibility for
Ordersendpoint so that it uses whatever is inCart.
Developers can opt out of this fallback method by registering an empty response toorderorcheckout-order.
Metadata
Metadata
Assignees
Labels
block: checkoutIssues related to the checkout block.Issues related to the checkout block.category: extensibilityWork involving adding or updating extensibility. Useful to combine with other scopes impacted.Work involving adding or updating extensibility. Useful to combine with other scopes impacted.focus: checkoutIssues related to the checkout flowIssues related to the checkout flowfocus: rest apiWork impacting REST api routes.Work impacting REST api routes.status: staleStale issues and PRs have had no updates for 60 days.Stale issues and PRs have had no updates for 60 days.team: Rubiktype: enhancementThe issue is a request for an enhancement.The issue is a request for an enhancement.