What the admin panel is handed at load time, and how to add to it
The admin panel is a bundle of its own, and it publishes no JavaScript API. There’s one global, and it’s data rather than code: the payload the panel is handed before its first fetch.
This exists on the plugin’s admin page only. Nothing is enqueued on your storefront, so there’s no front-end equivalent and there won’t be one.
Everything the panel is handed at load time is on window.cartPresetsBoot:
Key
Holds
restUrl
The REST base for cartpresets/v1
homeUrl
The site’s home URL
version
Plugin version
now
The store’s current time, on the store’s clock rather than the browser’s
currency
Code, symbol, position, decimals and separators
statuses
The derived status ladder
filterFields
The listing’s filter fields, each with its operators, from the allow-list the REST route validates against. listed marks the ones the Filters popover offers, and pro marks the ones locked on the free version
settings
Resolved store settings
isPro
Whether Pro is running
counts
Presets per derived status, plus all, for the whole store. The same numbers GET /presets returns, so the list can draw its header, status tabs and pager before its first fetch
upgradeUrl
Where the upgrade call to action points
carrierReady
Whether a usable carrier product is linked. The editor warns when a custom item would need one and there isn’t one
links
Every address the panel links out to: the documentation, support, reviews and, on Pro, the licence account. Filterable through cartpresets_admin_links
notices
The wording catalogue, as groups and items
licence
status (active, expired, cancelled or inactive) and expires (an ISO date, or null), added by Pro through cartpresets_admin_boot
If you work out a status yourself, use now. A preset’s status is derived live, and new Date() answers in the visitor’s timezone. A merchant abroad, or anyone near midnight, would otherwise see a status the server disagrees with.
The panel’s pricing, status and formatting helpers are internal, and there’s no component library to import.If you need the same values, ask the server. It’s the code the cart itself runs:
WooCommerce’s own wc_price() and wc_format_datetime(), which is where the panel’s currency and date settings come from
Last modified on September 28, 2026
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"SmartWP Plugins Documentation","colors":{"primary":"#5B3FE0","light":"#9D8CFF","dark":"#5B3FE0"},"logo":{"light":"https://mintcdn.com/growquest-technologies/9Hk7Fwl6-q3LJS13/images/LOGO_COLOR.svg?fit=max\u0026auto=format\u0026n=9Hk7Fwl6-q3LJS13\u0026q=85\u0026s=a43b0038924202eea5648ded3320a2f4","dark":"https://mintcdn.com/growquest-technologies/9Hk7Fwl6-q3LJS13/images/LOGO_WHITE.svg?fit=max\u0026auto=format\u0026n=9Hk7Fwl6-q3LJS13\u0026q=85\u0026s=ead0c1fd3af8a736d3d338c06525bd7e"},"favicon":{"light":"https://mintcdn.com/growquest-technologies/9Hk7Fwl6-q3LJS13/images/FAVICON_COLOR.svg?fit=max\u0026auto=format\u0026n=9Hk7Fwl6-q3LJS13\u0026q=85\u0026s=98fa9c4e58c38198cf89896eedf8d32f","dark":"https://mintcdn.com/growquest-technologies/9Hk7Fwl6-q3LJS13/images/FAVICON_WHITE.svg?fit=max\u0026auto=format\u0026n=9Hk7Fwl6-q3LJS13\u0026q=85\u0026s=ab265af6d2219eb743eef13273793b80"},"appearance":{"default":"dark"},"navbar":{"primary":{"type":"button","label":"Support","href":"http://smartwpplugins.com/support"}},"footer":{"socials":{"github":"https://github.com/Smart-WP-Plugins"}},"icons":{"library":"fontawesome"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"thumbnails":{"fonts":{"family":"Geist"}},"interaction":{"drilldown":true},"metadata":{"timestamp":true},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"growquest-technologies","hasAudioNarration":false,"actualSubdomain":"growquest-technologies","customDomains":["docs.smartwpplugins.com"],"gitSource":{"type":"github","owner":"smart-wp-plugins","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6aec81868c2847cc731f8706","collectionId":"9d19a82f-2158-47d7-a2bb-770e9e8f7ca0","liveDeploymentHistoryId":"6aec81868c2847cc731f8706","schemaVersion":"v3"},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aec81868c2847cc731f8706","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"Admin Powerups for WooCommerce","count":35},{"language":"default","tag":"CartPresets for WooCommerce","count":30},{"language":"default","tag":"Unwan","count":18},{"language":"default","tag":"Building presets","count":8},{"language":"default","tag":"Developers","count":8},{"language":"default","tag":"Customers","count":6},{"language":"default","tag":"Orders","count":6},{"language":"default","tag":"Store operations","count":6},{"language":"default","tag":"Developer","count":6},{"language":"default","tag":"Links and the cart","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"privacy":{"consentBanner":{"enabled":false}},"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"cartpresets/developers/javascript","slug":"/cartpresets/developers/javascript","pageMetadata":{"title":"The boot payload","description":"What the admin panel is handed at load time, and how to add to it","icon":"square-js","href":"/cartpresets/developers/javascript"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"What the admin panel is handed at load time, and how to add to it\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];const Pro=()=>_jsx(`span`,{style:{display:`inline-flex`,alignItems:`center`,verticalAlign:`middle`,fontSize:`0.68em`,fontWeight:700,letterSpacing:`0.07em`,lineHeight:1,padding:`0.32em 0.55em`,borderRadius:`0.3em`,background:`#f5b301`,color:`#2b2000`,marginLeft:`0.4em`,textTransform:`uppercase`},children:`Pro`});function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning,_MdxComponentBoundary}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);if(!_MdxComponentBoundary)_missingMdxReference(`_MdxComponentBoundary`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The admin panel is a bundle of its own, and it publishes no JavaScript API. There’s one global, and it’s data rather than code: the payload the panel is handed before its first fetch.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`This exists on the plugin’s admin page only. Nothing is enqueued on your storefront, so there’s no front-end equivalent and there won’t be one.`})}),`\n`,_jsx(Heading,{level:`2`,id:`the-boot-payload`,children:`The boot payload`}),`\n`,_jsxs(_components.p,{children:[`Everything the panel is handed at load time is on `,_jsx(_components.code,{children:`window.cartPresetsBoot`}),`:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Key`}),_jsx(_components.th,{children:`Holds`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`restUrl`})}),_jsxs(_components.td,{children:[`The REST base for `,_jsx(_components.code,{children:`cartpresets/v1`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`homeUrl`})}),_jsx(_components.td,{children:`The site’s home URL`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`version`})}),_jsx(_components.td,{children:`Plugin version`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`now`})}),_jsx(_components.td,{children:`The store’s current time, on the store’s clock rather than the browser’s`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`currency`})}),_jsx(_components.td,{children:`Code, symbol, position, decimals and separators`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`statuses`})}),_jsx(_components.td,{children:`The derived status ladder`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`filterFields`})}),_jsxs(_components.td,{children:[`The listing’s filter fields, each with its operators, from the allow-list the REST route validates against. `,_jsx(_components.code,{children:`listed`}),` marks the ones the `,_jsx(_components.strong,{children:`Filters`}),` popover offers, and `,_jsx(_components.code,{children:`pro`}),` marks the ones locked on the free version`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`settings`})}),_jsx(_components.td,{children:`Resolved store settings`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`isPro`})}),_jsx(_components.td,{children:`Whether Pro is running`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`counts`})}),_jsxs(_components.td,{children:[`Presets per derived status, plus `,_jsx(_components.code,{children:`all`}),`, for the whole store. The same numbers `,_jsx(_components.code,{children:`GET /presets`}),` returns, so the list can draw its header, status tabs and pager before its first fetch`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`upgradeUrl`})}),_jsx(_components.td,{children:`Where the upgrade call to action points`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`carrierReady`})}),_jsx(_components.td,{children:`Whether a usable carrier product is linked. The editor warns when a custom item would need one and there isn’t one`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`links`})}),_jsxs(_components.td,{children:[`Every address the panel links out to: the documentation, support, reviews and, on Pro, the licence account. Filterable through `,_jsx(_components.a,{href:`/cartpresets/developers/hooks-reference#the-admin-panel`,children:_jsx(_components.code,{children:`cartpresets_admin_links`})})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`notices`})}),_jsxs(_components.td,{children:[`The wording catalogue, as `,_jsx(_components.code,{children:`groups`}),` and `,_jsx(_components.code,{children:`items`})]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`licence`}),_jsx(_MdxComponentBoundary,{name:`Pro`,children:_jsx(Pro,{})})]}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`status`}),` (`,_jsx(_components.code,{children:`active`}),`, `,_jsx(_components.code,{children:`expired`}),`, `,_jsx(_components.code,{children:`cancelled`}),` or `,_jsx(_components.code,{children:`inactive`}),`) and `,_jsx(_components.code,{children:`expires`}),` (an ISO date, or `,_jsx(_components.code,{children:`null`}),`), added by Pro through `,_jsx(_components.code,{children:`cartpresets_admin_boot`})]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`If you work out a status yourself, use `,_jsx(_components.code,{children:`now`}),`. A preset’s status is derived live, and `,_jsx(_components.code,{children:`new Date()`}),` answers in the visitor’s timezone. A merchant abroad, or anyone near midnight, would otherwise see a status the server disagrees with.`]}),`\n`,_jsx(Heading,{level:`2`,id:`adding-your-own-keys`,children:`Adding your own keys`}),`\n`,_jsxs(_components.p,{children:[`Add them from PHP through `,_jsx(_components.a,{href:`/cartpresets/developers/hooks-reference#the-admin-panel`,children:_jsx(_components.code,{children:`cartpresets_admin_boot`})}),`, and read them here without a second request.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`php`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`php`,children:_jsxs(_components.code,{language:`php`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`add_filter`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'cartpresets_admin_boot'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`function`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ( `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`\t$data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'myPlugin'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` array`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`( `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'enabled'`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =>`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`\treturn`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` $data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`} );`})}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` mine`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`cartPresetsBoot`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`myPlugin`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`That filter is additive only. Removing or rewriting an existing key breaks the panel, and nothing downstream checks.`})}),`\n`,_jsx(Heading,{level:`2`,id:`nothing-else-is-exported`,children:`Nothing else is exported`}),`\n`,_jsx(_components.p,{children:`The panel’s pricing, status and formatting helpers are internal, and there’s no component library to import.`}),`\n`,_jsx(_components.p,{children:`If you need the same values, ask the server. It’s the code the cart itself runs:`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`You want`}),_jsx(_components.th,{children:`Ask for`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A preset’s totals`}),_jsxs(_components.td,{children:[`The `,_jsx(_components.code,{children:`totals`}),` block on a preset from `,_jsx(_components.a,{href:`/cartpresets/developers/rest-api`,children:_jsx(_components.code,{children:`GET /presets`})})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`A preset’s derived status`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`derived_status`}),` on the same payload`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Money or a date formatted to store settings`}),_jsxs(_components.td,{children:[`WooCommerce’s own `,_jsx(_components.code,{children:`wc_price()`}),` and `,_jsx(_components.code,{children:`wc_format_datetime()`}),`, which is where the panel’s currency and date settings come from`]})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{Pro,default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"The boot payload","description":"What the admin panel is handed at load time, and how to add to it","icon":"square-js","href":"/cartpresets/developers/javascript"}}},"mdxSourceWithNoJs":null,"noJsSplices":[[142,456,"null;function _creat"]]},"mdxExtracts":{"tableOfContents":[{"title":"The boot payload","slug":"the-boot-payload","depth":2,"children":[]},{"title":"Adding your own keys","slug":"adding-your-own-keys","depth":2,"children":[]},{"title":"Nothing else is exported","slug":"nothing-else-is-exported","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"growquest-technologies","siteName":"SmartWP Plugins Documentation","title":"The boot payload - SmartWP Plugins Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-28T19:59:07.303Z","gitLastModified":"2026-09-28T19:58:53.000Z","originalFileLocation":"cartpresets/developers/javascript.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"What the admin panel is handed at load time, and how to add to it\">\u003cmeta data-mint-head name=\"application-name\" content=\"SmartWP Plugins Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/growquest-technologies/u3jM5CYmtfp0iNZ0/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/growquest-technologies/u3jM5CYmtfp0iNZ0/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/growquest-technologies/u3jM5CYmtfp0iNZ0/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/growquest-technologies/u3jM5CYmtfp0iNZ0/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/growquest-technologies/u3jM5CYmtfp0iNZ0/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/growquest-technologies/u3jM5CYmtfp0iNZ0/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/growquest-technologies/u3jM5CYmtfp0iNZ0/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/growquest-technologies/u3jM5CYmtfp0iNZ0/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/growquest-technologies/u3jM5CYmtfp0iNZ0/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"The boot payload - SmartWP Plugins Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"What the admin panel is handed at load time, and how to add to it\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"SmartWP Plugins Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.smartwpplugins.com/cartpresets/developers/javascript\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://growquest-technologies.mintlify.site/_mintlify/api/og/v2?division=Developers\u0026amp;title=The+boot+payload\u0026amp;description=What+the+admin+panel+is+handed+at+load+time%2C+and+how+to+add+to+it\u0026amp;theme=e3ae117994280647e9c5b6db\u0026amp;signature=e72bdb561b9e55d16debb2595a65baaad3ed01e1d9a778818d032b523991698b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"The boot payload - SmartWP Plugins Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"What the admin panel is handed at load time, and how to add to it\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://growquest-technologies.mintlify.site/_mintlify/api/og/v2?division=Developers\u0026amp;title=The+boot+payload\u0026amp;description=What+the+admin+panel+is+handed+at+load+time%2C+and+how+to+add+to+it\u0026amp;theme=e3ae117994280647e9c5b6db\u0026amp;signature=e72bdb561b9e55d16debb2595a65baaad3ed01e1d9a778818d032b523991698b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/growquest-technologies/u3jM5CYmtfp0iNZ0/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"SmartWP Plugins Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5B3FE0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.smartwpplugins.com/cartpresets/developers/javascript\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cartpresets/developers/javascript.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.smartwpplugins.com/#organization\",\"name\":\"SmartWP Plugins Documentation\",\"url\":\"https://docs.smartwpplugins.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/growquest-technologies/9Hk7Fwl6-q3LJS13/images/LOGO_COLOR.svg?fit=max\u0026auto=format\u0026n=9Hk7Fwl6-q3LJS13\u0026q=85\u0026s=a43b0038924202eea5648ded3320a2f4\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.smartwpplugins.com#website\",\"name\":\"SmartWP Plugins Documentation\",\"url\":\"https://docs.smartwpplugins.com\",\"publisher\":{\"@id\":\"https://docs.smartwpplugins.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.smartwpplugins.com/cartpresets/developers/javascript#webpage\",\"url\":\"https://docs.smartwpplugins.com/cartpresets/developers/javascript\",\"name\":\"The boot payload\",\"description\":\"What the admin panel is handed at load time, and how to add to it\",\"dateModified\":\"2026-09-28T19:58:53.000Z\",\"isPartOf\":{\"@id\":\"https://docs.smartwpplugins.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.smartwpplugins.com/cartpresets/developers/javascript#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.smartwpplugins.com/cartpresets/developers/javascript#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Developers\",\"item\":\"https://docs.smartwpplugins.com/cartpresets/developers/architecture\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"The boot payload\",\"item\":\"https://docs.smartwpplugins.com/cartpresets/developers/javascript\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.smartwpplugins.com/cartpresets/developers/javascript#article\",\"headline\":\"The boot payload\",\"name\":\"The boot payload\",\"description\":\"What the admin panel is handed at load time, and how to add to it\",\"url\":\"https://docs.smartwpplugins.com/cartpresets/developers/javascript\",\"mainEntityOfPage\":{\"@id\":\"https://docs.smartwpplugins.com/cartpresets/developers/javascript#webpage\"},\"dateModified\":\"2026-09-28T19:58:53.000Z\",\"publisher\":{\"@id\":\"https://docs.smartwpplugins.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.smartwpplugins.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"SmartWP Plugins Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"SmartWP Plugins Documentation","nav":{"global":null,"products":[{"product":"Unwan","pages":[{"title":"Unwan","href":"/unwan/introduction"}]},{"product":"CartPresets for WooCommerce","pages":[{"title":"Introduction","icon":"house","href":"/cartpresets/introduction"},{"title":"Installation","icon":"download","href":"/cartpresets/installation"},{"title":"Quickstart","icon":"bolt","href":"/cartpresets/quickstart"},{"title":"The admin interface","icon":"window","href":"/cartpresets/interface"},{"group":"Building presets","icon":"layer-group","pages":[{"title":"Items","icon":"boxes-stacked","href":"/cartpresets/building/items"},{"title":"Pricing and discounts","icon":"tag","href":"/cartpresets/building/pricing"},{"title":"Health checks","icon":"heart-pulse","href":"/cartpresets/building/health-checks"},{"title":"Scheduling","icon":"calendar","tag":"PRO","href":"/cartpresets/building/scheduling"},{"title":"Purchase limits","icon":"gauge-high","tag":"PRO","href":"/cartpresets/building/purchase-limits"},{"title":"Eligibility","icon":"user-lock","tag":"PRO","href":"/cartpresets/building/eligibility"},{"title":"Automatic coupons","icon":"ticket","tag":"PRO","href":"/cartpresets/building/auto-coupon"},{"title":"Subscriptions","icon":"rotate","href":"/cartpresets/building/subscriptions"}]},{"group":"Links and the cart","icon":"link","pages":[{"title":"Preset links","icon":"link","href":"/cartpresets/links/preset-links"},{"title":"Cart behaviour","icon":"cart-shopping","href":"/cartpresets/links/cart-behaviour"},{"title":"Where customers land","icon":"signs-post","href":"/cartpresets/links/destinations"},{"title":"Cart notices and wording","icon":"comment","href":"/cartpresets/links/wording"}]},{"group":"Store settings","icon":"sliders","pages":[{"title":"Settings reference","icon":"list-check","href":"/cartpresets/settings/reference"},{"title":"The carrier product","icon":"box","href":"/cartpresets/settings/carrier-product"},{"title":"Data and uninstall","icon":"database","href":"/cartpresets/settings/data-and-uninstall"},{"title":"Privacy and personal data","icon":"user-shield","href":"/cartpresets/settings/privacy"}]},{"title":"The Presets report","icon":"chart-line","tag":"PRO","href":"/cartpresets/analytics"},{"title":"Import and export","icon":"arrow-right-arrow-left","tag":"PRO","href":"/cartpresets/import-export"},{"title":"Licence and updates","icon":"key","tag":"PRO","href":"/cartpresets/licence"},{"title":"Performance","icon":"gauge-high","href":"/cartpresets/performance"},{"group":"Developers","icon":"code","pages":[{"title":"Architecture","icon":"sitemap","href":"/cartpresets/developers/architecture"},{"title":"Hooks reference","icon":"plug","href":"/cartpresets/developers/hooks-reference"},{"title":"REST API","icon":"code-branch","href":"/cartpresets/developers/rest-api"},{"title":"Order line item meta","description":"What every preset order line carries, and why the shipping keys exist","icon":"receipt","href":"/cartpresets/developers/order-meta"},{"title":"The boot payload","icon":"square-js","href":"/cartpresets/developers/javascript"}]},{"title":"FAQ and troubleshooting","description":"Common questions, and how to diagnose the usual problems","icon":"circle-question","href":"/cartpresets/faq"}]},{"product":"Admin Powerups for WooCommerce","pages":[{"title":"Admin Powerups for WooCommerce","href":"/admin-powerups/introduction"}]}]},"basePath":"","title":"The boot payload - SmartWP Plugins Documentation","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":[],"chunks":[]}