Skip to content

resync order shipping of shipping lines and lineItems fulfillment NONE#1379

Open
pbennett1-godaddy wants to merge 6 commits into
mainfrom
resync-changed-orders
Open

resync order shipping of shipping lines and lineItems fulfillment NONE#1379
pbennett1-godaddy wants to merge 6 commits into
mainfrom
resync-changed-orders

Conversation

@pbennett1-godaddy
Copy link
Copy Markdown
Collaborator

Summary

Fixes a checkout edge case where a customer can return to cart after selecting a shipping method, replace or add line items, and then land back on checkout with stale shippingLines but new line items
still set to fulfillmentMode: "NONE".

Because checkout saw the existing shippingLines, it treated shipping as already selected and allowed checkout to proceed. However, confirmCheckoutSession later removes shipping lines/totals when no
line items have fulfillmentMode: "SHIP".

This change updates the shipping method application logic so that when checkout detects existing shipping lines but line items still need shipping fulfillment, it reapplies the selected shipping
method. Reapplying the shipping method causes checkout-api to recalculate shipping and update line items to fulfillmentMode: "SHIP".

Changeset

Test Plan

  • Ran React package typecheck:
  pnpm --filter @godaddy/react typecheck                                                                                                                                                                  
  • Ran targeted React tests:
  pnpm --filter @godaddy/react test -- shipping-method                                                                                                                                                    
  • Manually verified the checkout scenario:
    1. Start checkout with shipping enabled.
    2. Select/apply a shipping method.
    3. Return to cart.
    4. Remove the existing line item and add a new/same item.
    5. Return to checkout.
    6. Confirm checkout reapplies the shipping method and updates the new line item from fulfillmentMode: "NONE" to fulfillmentMode: "SHIP".

@pbennett1-godaddy pbennett1-godaddy requested a review from a team as a code owner May 28, 2026 15:47
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 28, 2026

🦋 Changeset detected

Latest commit: 3322ea5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@godaddy/react Patch
nextjs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment thread packages/react/src/components/checkout/shipping/shipping-method.tsx Outdated
Comment thread packages/react/src/components/checkout/shipping/shipping-method.tsx Outdated
Copy link
Copy Markdown
Contributor

@wcole1-godaddy wcole1-godaddy left a comment

Choose a reason for hiding this comment

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

Approved. Latest revision addresses my previous concerns, and CI is green.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants