§5.13
Order flow without page reloads, badge and billing profile
- Phase 11.4
- theme 1.14.0
- Flow region:
header.wcpwrites<div id="wi-flow" data-flow-root …><!--wi-flow-->inside<main>,footer.wcpwrites<!--/wi-flow--></div>. For a request with theX-WIACP-Flow: 1header the core returns the part between these two markers as JSON. Without the markers the browser opens the full page (older themes are unaffected). A page container that joins the flow carriesdata-flow-scopeanddata-flow-stage; forms in that scope anda[data-flow-link]links are submitted bytheme.js. A theme script must listen for thewi:flow:loadevent and bind again when the region changes. - Shared data:
$cart_badge{count,label} — only this visitor's cart line count (domains included) and an accessible label. When the count is 0 the badge is hidden;aria-labeluses the label. The key iscart_badge, notcart, so it does not clash with page data. - Stages:
$stages/ in checkout$steps[{keyconfigure / addons / profile / summary / payment,number,label,current,done,url}]; the default theme draws them withincludes/stages.wcp. - configureproduct.wcp:
$state['panel'](1, 2 or 0 = both),$state['panels']; hiddenpanelfield andaction=next|backbuttons. Fields in a hidden panel are submitted too (view only). - cart.wcp:
$groups{product,domain} andkindper line; domains are a separate section. - checkout.wcp:
$steppreview / profile / review;$profile{cards[…,selected,complete,edit_url,can_reveal],select_action,reveal_action,account_open,can_add,new_open,new_form_html,edit,manage_url};$review['coupon']{code,applied,error,discount,action} — the coupon form is not inside the confirmation form but a separate form linked with theform="…"attribute. ID / tax numbers arrive masked only; from 1.22.0 on, showing them in full takes the client's password and lasts 5 minutes (§5.21). - ordercomplete.wcp:
$proforma{number,issued,due_date,items[description,sub,quantity,amount],subtotal,discount,taxes,total,billing};$stages. - Mobile bar:
includes/flow-bar.wcp(≤ 991 px;env(safe-area-inset-bottom); hidden while the keyboard is open; when thedata-bar-formform is invalid the button isaria-disabled). The amount is only the server's formatted text. - There is no guest step (
$guestandguest_blockedon a line are constantfalsefor older themes). - Profile stage declaration: a theme that draws stage 3 (billing profile) declares
'supports' => [..., 'checkout_profiles']in the manifest. A theme that does not (for example a custom theme based on 1.13.0) works with the 11.3 flow: a visitor who is not signed in is sent to the login page; if the account is complete, the account details are selected as the profile and thereviewstep opens directly; if incomplete (or with?adim=bilgiler),$step = 'details'arrives with$details['form_html'](account billing form). Additional billing profiles are managed only in My account › Billing profiles.