Skip to main content

Checkout Shell

The checkout shell owns checkout scope, form serialization, notices, and order submission.

Components

Component keyRole
OmeWooCheckoutProviderLayout and state scope for checkout components. It does not submit data.
OmeWooCheckoutFormReal checkout form shell. Serializes authored checkout fields and submits Store API checkout.
OmeWooCheckoutNoticesCheckout notice region.
OmeWooPlaceOrderButtonSubmit button for the checkout form.

Authoring Structure

CheckoutProvider
CheckoutForm
BillingAddressForm
ShippingAddressForm
ShippingMethodSelector
PaymentMethodSelector
TermsCheckbox
CheckoutNotices
PlaceOrderButton
OrderSummary

OrderSummary can sit inside the provider but does not have to be inside the <form>.

CheckoutProvider

CheckoutProvider provides a stable checkout root and state scope. It is the preferred wrapper for full checkout layouts because CheckoutForm uses the closest provider as its serialization scope.

CheckoutForm

CheckoutForm:

  • Serializes all [data-ome-woo-checkout-field] controls inside the provider or form scope.
  • Copies billing to shipping when the different-shipping toggle is unchecked.
  • Runs local validation before submit.
  • Persists field changes with Store API update requests.
  • Submits checkout through Store API.
  • Dispatches checkout lifecycle events.
  • Redirects when the Store API payment result returns a redirect URL.

Form state is mirrored as data-ome-state: idle, loading, updating, processing, success, or error.

CheckoutNotices Props

PropMeaning
preview.show_in_builderShows a sample notice in Etch builder preview.
preview.notice_typePreview notice type.
accessibility.aria_labelNotice region accessible label.
accessibility.live_regionLive region politeness.

PlaceOrderButton Props

PropMeaning
content.labelButton text.
accessibility.aria_labelAccessible label.

PlaceOrderButton subscribes to checkout store state and disables itself while checkout is busy.

Scenario Coverage

ScenarioCovered behavior
checkout_successRequired fields and payment method can submit a real Store API order.
checkout_validation_errorKnown invalid fields are marked locally and Store API submit is blocked.
checkout_terms_blockedUnchecked terms creates checkout notice and error state.
checkout_terms_successChecked terms allows the success flow.
lifecycle_checkoutCheckout creates an order through native Store API checkout hooks.