Skip to content

Add helper createdWithVersion and improve logic for coupon field based on order's api version - #857

Open
gciotola wants to merge 2 commits into
feat/819-new-paymentsfrom
feat/856-created-with-version
Open

gciotola wants to merge 2 commits into
feat/819-new-paymentsfrom
feat/856-created-with-version

Conversation

@gciotola

@gciotola gciotola commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Adds isCreatedWithVersion(order, version) to core-components, reading the
created_with_version the API returns in the order's meta.

GiftCardOrCouponForm uses it to pick the code field: orders created with
2026-05 get the coupon field only, since the API no longer applies order-level
gift cards on them; orders created with 2017-08 keep the combined field.

@netlify

netlify Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for commercelayer-react-components ready!

Name Link
🔨 Latest commit 1a72744
🔍 Latest deploy log https://app.netlify.com/projects/commercelayer-react-components/deploys/6abf9daa0ebf3f000867b5d4
😎 Deploy Preview https://deploy-preview-857--commercelayer-react-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@gciotola
gciotola changed the base branch from main to feat/819-new-payments October 2, 2026 12:04
@gciotola
gciotola marked this pull request as ready for review October 2, 2026 12:06
@gciotola gciotola changed the title feat/856 created with version Add helper createdWithVersion and improve logic for coupon field based on order's api version Oct 2, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
npm i https://pkg.pr.new/@commercelayer/core-components@857
npm i https://pkg.pr.new/@commercelayer/react-components@857
npm i https://pkg.pr.new/@commercelayer/react-hooks-components@857

commit: a8d7ac5

@gciotola gciotola self-assigned this Oct 2, 2026
@gciotola gciotola added the enhancement New feature or request label Oct 2, 2026
@gciotola
gciotola requested review from acasazza and malessani October 2, 2026 12:09

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant