My Account
AccountProvider owns the account area shell: one slot per WooCommerce My Account endpoint, switched by the account session on the storefront and by the preview property in the builder. Every other component in this family renders inside one of those slots and reads the account dynamic sources.
When To Use This Family
Use this family on the WooCommerce account page to compose the customer account area: sign in and registration for visitors, and the dashboard, orders, addresses, account details, saved payment methods, and downloads for signed-in customers.
Quick Start
<OmeWooAccountProvider>
{#slot auth}
<OmeWooAccountNotices />
<OmeWooAccountLoginForm />
{/slot}
{#slot dashboard}
<OmeWooAccountGreeting />
<OmeWooAccountNotices />
<OmeWooAccountNavigation />
{/slot}
{#slot orders}
<OmeWooAccountNavigation />
<OmeWooAccountOrders />
{/slot}
</OmeWooAccountProvider>
Slots you do not compose render nothing for that endpoint. Start with the endpoints you need and add the rest later.
Components
| Component key | Role |
|---|---|
OmeWooAccountProvider | Account area shell. Owns one slot per account endpoint and switches between them. |
OmeWooAccountNavigation | Account endpoint menu built from the account session URLs. |
OmeWooAccountNotices | Account notice region for WooCommerce success and error messages. |
OmeWooAccountGreeting | Customer greeting bound to the display name. |
OmeWooLogoutLink | Logout link with the WooCommerce logout nonce URL. |
OmeWooAccountLoginForm | Login form posting to the WooCommerce core login handler. |
OmeWooAccountRegisterForm | Registration form posting to the WooCommerce core register handler. |
OmeWooAccountLostPasswordForm | Lost password form posting to the core password-reset request handler. |
OmeWooAccountResetPasswordForm | Reset password form for the reset link, gated on a valid reset key. |
OmeWooAccountOrders | Orders list loop over the account orders source. |
OmeWooAccountOrderDetail | Single order view: items, totals, and addresses. |
OmeWooAccountAddressForm | Billing or shipping address form posting to the core save-address handler. |
OmeWooAccountDetailsForm | Account details form for name, email, and password changes. |
OmeWooAccountPaymentMethods | Saved payment methods list with delete, set-default, and default badge. |
OmeWooAccountAddPaymentMethodForm | Add payment method form with server-rendered gateway fields. |
OmeWooAccountDownloads | Customer downloads list with download buttons. |
Provider Slots
| Slot | Renders on |
|---|---|
auth | Signed-out visitors, and the lost-password endpoint. |
dashboard | Signed-in customers on the dashboard endpoint. |
orders | Signed-in customers on the orders endpoint. |
view-order | Signed-in customers viewing one of their orders. |
downloads | Signed-in customers on the downloads endpoint. |
edit-address | Signed-in customers editing addresses. |
edit-account | Signed-in customers editing account details. |
payment-methods | Signed-in customers on the payment methods endpoints, including add, delete, and set-default actions. |
The storefront switching is condition-driven, so one composed page serves every endpoint. Components that need a signed-in customer hide themselves on the storefront while the visitor is signed out, and the auth forms hide themselves once the visitor is signed in.
Auth Form Behavior
The auth forms are real WooCommerce form posts, not Store API requests. They submit to the same core handlers the classic WooCommerce templates use, with nonces resolved as dynamic tokens, so core validation, error messages, redirects, and third-party extensions keep working.
AccountRegisterFormonly renders on the storefront when the store allows registration.AccountResetPasswordFormonly renders when the reset link carries a valid reset key, so expired and already-used links show the lost-password step instead.- Success and error messages appear in
AccountNotices, which reads the same notice store WooCommerce core writes to.
Extra registration fields
Define additional fields through ome_woo_account_registration_fields in a site plugin or a PHP snippets plugin. PHP defines the field names, types, and requirements. Builder controls cannot weaken those rules.
add_filter( 'ome_woo_account_registration_fields', static function ( array $fields ): array {
$fields[] = array(
'name' => 'first_name',
'label' => 'First name',
'required' => true,
);
$fields[] = array(
'name' => 'last_name',
'label' => 'Last name',
'required' => false,
);
$fields[] = array(
'name' => 'ome_registration_terms',
'label' => 'I accept the terms and privacy policy',
'type' => 'checkbox',
'required' => true,
'description' => 'Acceptance is required to create an account.',
);
return $fields;
} );
Supported types are text, email, tel, and checkbox. Names use lowercase letters, digits, and underscores. Use a site-specific prefix for custom metadata names. first_name and last_name update the customer profile; other names save as customer metadata. Labels and descriptions are plain text. Add policy links through the standard registration form hooks or the surrounding page content.
In the registration component's Fields group:
fields.show_optional_fieldsdefaults totrue. Turning it off hides optional extra fields, but required fields stay visible.fields.show_descriptionsdefaults totrue. Turning it off hides helper descriptions.
These controls affect presentation only. Required fields are checked after sanitization, required checkboxes must submit the accepted value, and email fields must contain a valid email address. Values save only after a valid registration request creates the matching customer. Checkout and programmatic customer creation do not inherit these profile writes.
The same PHP fields also appear in the classic WooCommerce registration template. Without the filter, no extra fields are added. Login and registration trigger WooCommerce's standard form actions; security plugins using those actions can render widgets and perform their own server-side checks. Individual CAPTCHA integrations require their own configuration and testing.
Notice lifecycle
Place AccountNotices where customers should see success and error messages. Reading account data through a greeting or navigation component does not consume pending messages. Displayed messages are consumed so they do not appear on a later request. Safe links and emphasis survive; unsafe markup does not.
Orders, Pay, And Cancel
AccountOrdersrenders the customer's orders with number, date, status, and total, plus a view link.- Orders that still need payment expose a pay link that opens the classic WooCommerce pay-for-order screen.
- Cancellable orders expose a cancel button backed by a dedicated REST route. The route re-checks the nonce, the order owner, and the cancellable status (
pending,on-hold, orfailed) before WooCommerce cancels the order, so the button cannot cancel someone else's or already-paid order. AccountOrderDetailrenders one order with its items, totals, and billing and shipping addresses, including pay and cancel actions where they still apply.
Address And Details Forms
AccountAddressFormposts to the WooCommerce core save-address handler. Setaddress.typetobillingorshippingto bind the form to one address book entry.- Each address form submits to its typed WooCommerce endpoint, including on the untyped Addresses page or a custom placement. On a typed billing or shipping endpoint, only its matching form appears.
- Country changes update WooCommerce's state controls and country-specific requirements. Address fields use WooCommerce's field filters, saved customer metadata, and field-value filters. Failed validation retains the submitted edits. Released field label classes and wrapper attributes remain available for existing styles.
AccountDetailsFormposts name, email, and optional password changes to the core save-account-details handler. Current-password rules and email conflict messages come from WooCommerce.
Payment Methods And Downloads
AccountPaymentMethodslists saved methods with brand, last digits, expiry, and the default badge. Delete and set-default actions use the core nonce'd action URLs and ask WooCommerce to confirm.AccountAddPaymentMethodFormrenders the gateway's own fields server-side, so gateways with custom field scripts keep working.AccountDownloadslists purchased downloads with remaining counts and expiry where WooCommerce tracks them.
Builder Preview
AccountProvider exposes preview.endpoint, a select that switches the builder canvas between every account slot so each screen can be designed without signing in or out. The components render sample data in the builder; the storefront always renders live account data.
Dynamic Data
The family reads six account dynamic sources: accountSession, accountNotices, accountOrders, accountOrder, accountPaymentMethods, and accountDownloads. See Woo Dynamic Data Tree for every field.
Related Guides
- My Account Page composes this family into a full account page.
- Order Received closes the funnel after checkout.
- Shared Controls And Props for the styling class props every family uses.