Skip to main content
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.

The boot payload

Everything the panel is handed at load time is on window.cartPresetsBoot: 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.

Adding your own keys

Add them from PHP through cartpresets_admin_boot, and read them here without a second request.
That filter is additive only. Removing or rewriting an existing key breaks the panel, and nothing downstream checks.

Nothing else is exported

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:
Last modified on September 28, 2026