Checkout Shell
The checkout shell owns checkout scope, form serialization, notices, and order submission.
When To Use This Family
Use this family for the main checkout surface. It provides the checkout state scope, owns checkout form submission, renders checkout notices, and provides the submit button.
Quick Start
<OmeWooCheckoutProvider>
{#slot default}
<OmeWooCheckoutForm>
{#slot default}
<OmeWooBillingAddressForm />
<OmeWooShippingAddressForm />
<OmeWooPaymentMethodSelector />
<OmeWooTermsCheckbox />
<OmeWooCheckoutNotices />
<OmeWooPlaceOrderButton />
{/slot}
</OmeWooCheckoutForm>
{/slot}
</OmeWooCheckoutProvider>
Components
| Component key | Role |
|---|---|
OmeWooCheckoutProvider | Layout and state scope for checkout components. It does not submit data. |
OmeWooCheckoutForm | Real checkout form shell. Serializes authored checkout fields and submits Store API checkout. |
OmeWooCheckoutNotices | Checkout notice region. |
OmeWooPlaceOrderButton | Submit 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.
Empty Cart State
Once the Store API cart has loaded with no items, the provider switches data-ome-state from idle to empty and reveals its [data-ome-woo-checkout-empty] region. It switches back to idle when items arrive. A cart that has not loaded yet is never treated as empty, and the Order Received page is excluded.
- The
emptyslot holds your own empty-cart content. Turn onpreview.empty_stateto show it in the builder. - When the
emptyslot is unused, the runtime shows a default message and a "Return to shop" link (OME_WOO.messages.checkoutEmpty,OME_WOO.messages.returnToShop,OME_WOO.shopUrl). PlaceOrderButtonstays disabled while the loaded cart is empty.- By default your checkout content stays visible. Style
[data-ome-woo-checkout-provider][data-ome-state="empty"]to change that, or turn onbehavior.hide_form_when_empty.
Turn on behavior.hide_form_when_empty to hide everything in the provider except the empty-cart region while the loaded cart is empty. The runtime sets hidden on the provider's other direct children (they leave the layout and can't be focused) and shows them again when the cart gets items. Children you hid yourself stay hidden. If focus was inside the hidden content, it moves to the empty-cart region. The option is off by default, the builder keeps showing your form, and the Order Received page is not affected.
| Prop | Meaning |
|---|---|
preview.empty_state | Shows the empty-cart slot in the Etch builder. |
behavior.hide_form_when_empty | Hides the rest of the checkout while the loaded cart is empty. Off by default. |
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.
Checkout lifecycle integrations should listen for the checkout events documented in Woo Custom Events: ome-woo:checkout-loaded, ome-woo:checkout-started, ome-woo:checkout-complete, and ome-woo:checkout-error.
CheckoutNotices Props
| Prop | Meaning |
|---|---|
preview.show_in_builder | Shows a sample notice in Etch builder preview. |
preview.notice_type | Preview notice type. |
accessibility.aria_label | Notice region accessible label. |
accessibility.live_region | Live region politeness. |
PlaceOrderButton Props
| Prop | Meaning |
|---|---|
content.label | Button text. |
accessibility.aria_label | Accessible label. |
PlaceOrderButton subscribes to checkout store state and disables itself while checkout is busy or the loaded cart is empty.