Skip to content

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

Open
nlaverde-godaddy wants to merge 2 commits intogodaddy:mainfrom
nlaverde-godaddy:vnext-79361
Open

fix(checkout): only require name for free pickup orders#1368
nlaverde-godaddy wants to merge 2 commits intogodaddy: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

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.

1 participant