Coupons
This family applies, lists, and removes Woo cart coupons.
When To Use This Family
Use this family on cart pages and mini-carts where customers can apply or remove coupon codes.
Quick Start
Coupon form and applied coupon rows
<OmeWooCouponForm />
<OmeWooCouponAppliedList>
{#slot default}
<OmeWooCouponRemoveButton />
{/slot}
</OmeWooCouponAppliedList>
Components
| Component key | Role |
|---|---|
OmeWooCouponForm | Applies a coupon code through Store API. |
OmeWooCouponAppliedList | Renders active cart coupons. |
OmeWooCouponRemoveButton | Removes the current coupon row. |
Authoring Structure
CouponForm
CouponAppliedList
CouponRemoveButton
CouponRemoveButton belongs inside CouponAppliedList because the runtime injects the coupon code into each row and button.
CouponForm Props
| Prop | Meaning |
|---|---|
| Input hint copy | Text shown inside the coupon code field before entry. |
content.button_label | Submit button text. |
accessibility.input_aria_label | Input accessible label. |
accessibility.button_aria_label | Button accessible label. |
If the submitted code is empty, the form moves to error without calling Store API.
CouponAppliedList Props
| Prop | Meaning |
|---|---|
content.show_empty_message | Shows an empty message when no coupons are applied. |
content.empty_message | Empty message text. |
preview.rows | Number of coupon rows in builder preview. |
preview.empty_state | Shows empty state in builder preview. |
Runtime state is has-coupons or empty.
CouponRemoveButton Props
| Prop | Meaning |
|---|---|
content.label | Button text. |
accessibility.aria_label | Button accessible label. |
The runtime reads data-ome-woo-coupon-remove-code or data-ome-woo-coupon-code from the hydrated row.
Runtime Behavior
Applying or removing a coupon calls Store API and refreshes the cart store. Woo Store API coupon mutations can omit totals, so WooCartStore refreshes the cart after coupon responses when totals are missing.