Skip to main content

Terms Checkbox

TermsCheckbox renders checkout terms acceptance and tells the checkout store whether terms are accepted.

Component

Component keyRole
OmeWooTermsCheckboxRenders the terms checkbox, optional label slot, and checkout terms state.

Props

PropMeaning
content.labelLabel text when using component-managed label copy.
content.required_messageLocal error message when terms are required but unchecked.
accessibility.aria_labelAccessible checkbox label.

The component also accepts a default slot, so authors can put richer terms copy next to the checkbox.

Runtime Behavior

The runtime binds input[data-ome-woo-terms-checkbox] and updates the checkout store:

Store flagMeaning
terms_requiredCheckout should block if the checkbox is unchecked.
terms_acceptedCurrent checkbox state.

When terms are required and unchecked, WooCheckoutStore.submit() emits a local terms_required error, sets checkout state to error, and CheckoutNotices renders the message.

Scenario Coverage

ScenarioCovered behavior
checkout_terms_blockedUnchecked terms blocks checkout and renders a checkout notice.
checkout_terms_successChecked terms allows checkout success.
lifecycle_checkoutTerms accepted flow reaches Store API checkout and native order hooks.