Skip to content

fix(checkout): only require name for free pickup orders#1368

Merged
wcole1-godaddy merged 2 commits into
godaddy:mainfrom
nlaverde-godaddy:vnext-79361
May 12, 2026
Merged

fix(checkout): only require name for free pickup orders#1368
wcole1-godaddy merged 2 commits into
godaddy:mainfrom
nlaverde-godaddy:vnext-79361

Conversation

@nlaverde-godaddy
Copy link
Copy Markdown
Contributor

@nlaverde-godaddy nlaverde-godaddy commented May 8, 2026

Summary

Fixes the "Complete your free order" button not working for free pickup orders.

Problem

When a customer had a free order with PICKUP delivery, clicking "Complete your free order" did nothing. The form validation required full billing address fields, but those fields weren't visible in the UI, causing silent validation failure.

Solution

  • For free pickup orders (paymentMethod === 'offline' + deliveryMethod === 'PICKUP'), only require billingFirstName and billingLastName
  • Display name input fields in the payment section for this scenario
  • Skip billing address validation (address, city, state, postal code) for free pickup orders

Changes

  • checkout.tsx - Updated Zod schema validation to handle free pickup case
  • custom-form-provider.tsx - Updated field filtering logic for validation
  • free-payment-form.tsx - Added name input fields for pickup orders
  • free-payment-form.test.ts - Added unit tests for billing validation logic

Testing

  • Unit tests pass (105 tests)
  • Manual testing with free pickup order

free payment and pickup upder:

Screenshot 2026-05-08 at 16 09 28

Related

VNEXT-79361

@nlaverde-godaddy nlaverde-godaddy requested a review from a team as a code owner May 8, 2026 21:09
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

🦋 Changeset detected

Latest commit: 3b5eb12

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

Copy link
Copy Markdown
Collaborator

@pbennett1-godaddy pbennett1-godaddy left a comment

Choose a reason for hiding this comment

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

everything looks good; tested old and new flows.

@wcole1-godaddy wcole1-godaddy merged commit 5771b98 into godaddy:main May 12, 2026
3 checks passed
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.

3 participants