Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Checkout order and Order endpoints don't support extensions endpoint and aren't backward compatible. #11197

Open
senadir opened this issue Oct 10, 2023 · 1 comment
Labels
block: checkout Issues related to the checkout block. category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. focus: checkout Issues related to the checkout flow focus: rest api Work impacting REST api routes. status: stale Stale issues and PRs have had no updates for 60 days. team: Rubik type: enhancement The issue is a request for an enhancement.

Comments

@senadir
Copy link
Member

senadir commented Oct 10, 2023

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 CheckoutSchema class) but the key is checkout-order instead of checkout. This means plugins relying on pushing data with checkout POST requests will not work as they're waiting at checkout key.

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 Orders endpoint.
  • Add backward compatibility to Checkout Orders endpoint so that it uses whatever is registered in checkout, but only if nothing is registered in checkout-order. This will probably require some tweaking from our ExtendSchema class.
  • Add the same backward compatibility for Orders endpoint so that it uses whatever is in Cart.
    Developers can opt out of this fallback method by registering an empty response to order or checkout-order.
@senadir senadir added type: bug The issue/PR concerns a confirmed bug. category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. focus: rest api Work impacting REST api routes. block: checkout Issues related to the checkout block. labels Oct 10, 2023
@nerrad nerrad added the focus: checkout Issues related to the checkout flow label Nov 29, 2023
@mikejolley mikejolley added type: enhancement The issue is a request for an enhancement. and removed type: bug The issue/PR concerns a confirmed bug. labels Dec 13, 2023
Copy link
Contributor

This issue has been marked as stale because it has not seen any activity within the past 60 days. Our team uses this tool to help surface issues for review. If you are the author of the issue there's no need to comment as it will be looked at.

@github-actions github-actions bot added the status: stale Stale issues and PRs have had no updates for 60 days. label Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: checkout Issues related to the checkout block. category: extensibility Work involving adding or updating extensibility. Useful to combine with other scopes impacted. focus: checkout Issues related to the checkout flow focus: rest api Work impacting REST api routes. status: stale Stale issues and PRs have had no updates for 60 days. team: Rubik type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

No branches or pull requests

3 participants