Skip to content
Gaurav TiwariDocs

Put Checkout on Any Page

Updated October 30, 2026

Your pricing page lists three plans, and every Buy button sends the buyer to another page to pay. They lose the comparison they were reading, and anything already in their cart ends up in the order.

On-page Checkout puts plan cards and your real checkout form on the same page. Buyers pick a plan and pay right there. Each plan checks out from its own cart, so the store cart is left alone.

Play Pause
Backward 10s Play Pause Forward 10s Unmute Mute
/
Settings Playback Accessibility
Announcements
Keyboard Animations
Enter PiP Exit PiP Enter Fullscreen Exit Fullscreen
Video walkthrough: put WooCommerce checkout on any page (2:40).

Turn It On

Switch on On-page Checkout under Stackless → Dashboard, then add the On-page Checkout block or the [stackless_checkout] shortcode to any page or post. Modal Checkout needs this module too, because its modal shows the same embedded checkout.

Add the Block

Add On-page Checkout from the WooCommerce block category. The Product and plans panel picks what it sells:

  • Product: search for a simple or variable product. A simple product is one plan, and a variable product offers each variation as a plan. Leave it empty in a product template or a loop of products to use the current product.
  • Plans (product or variation IDs): optional. Comma-separated IDs in display order. They can come from different products and replace the product above.
  • Preselected plan (ID): the plan picked first. Without it, the first available plan is picked.

The Display panel sets how it looks:

  • Heading: an optional heading above the plans.
  • Checkout design: the Checkout Builder layout the form uses. See Match Your Checkout Design below.
  • Layout: Checkout form shown on the page (default), or Button that opens the form in place.
  • Button text: for the button layout. Defaults to “Buy now”.
  • Let buyers choose a quantity: off by default. Adds a Quantity field from 1 to 100, hidden for products sold individually.
  • Coupon to apply: optional. When it’s empty, a ?coupon= code in the page address is applied.

Use the Shortcode

[stackless_checkout product="12" plans="34,35" default="35" layout="inline" quantity="no"]
AttributeWhat it doesDefault
productA product ID. A variable product offers each variation. current uses the product the shortcode is rendered for.the current product
plansProduct or variation IDs in display order, separated by commas or spaces. Replaces product.none
defaultID of the plan picked first.first available plan
layoutinline shows the form, button shows a button that opens it in place.inline
designThe checkout look: inherit (the active Checkout Builder layout), none (no layout), or classic, split, warm-split, focused or review-first.inherit
buttonButton text for the button layout.Buy now
titleA heading above the plans.none
quantityyes adds the Quantity field.no
couponA coupon applied to the checkout, up to 64 characters.none
url_couponno ignores a ?coupon= code in the page address.yes

The block has no url_coupon option. It always applies a coupon from the page address when its own is empty.

Match Your Checkout Design

The embedded form shows your active Checkout Builder layout, with its colors, so the checkout on a sales page looks like your checkout page. The plan cards take the layout’s accent color too. Pick another look for one block with its Checkout design option, or with the shortcode’s design attribute:

  • Active Checkout Builder layout (inherit, the default): whatever Checkout Builder has switched on. With no layout chosen there, the form keeps your store’s own checkout look.
  • Store checkout, no layout (none): your checkout without a Checkout Builder layout. It fits narrow columns best. compact means the same.
  • A layout by name (classic, split, warm-split, focused or review-first): that layout for this block only, while your checkout page keeps its own.

Layouts need the Checkout Builder module. With it off, every block shows the store checkout. In the block editor, the block shows its plan cards and an outline of the chosen layout where the form will load.

Product Templates and Query Loops

Leave the product empty and list no plans, and the block uses the product it’s rendered for: in a single product template, in a query loop of products, or in a product’s own content. One block in a template gives every product its own checkout. In the shortcode, product="current" does the same.

Use It in Bricks

With the Bricks theme active, On-page Checkout is also a Bricks element with the same options: product, plans, preselected plan, checkout design, heading, layout, button text, quantity and coupon. Its style controls set the plan card accent, background, border and text, and the button’s background, text and border. The checkout itself takes its look from Checkout Builder.

  • Leave the product empty in a product template or a query loop of products to use the current product. To preview it in a template, set Populate content to a product.
  • The builder shows the plan cards and an outline of the chosen layout. The checkout loads on the live page.
  • The element fills the width of a flex row or column.

For a step-by-step setup with screenshots, see Use On-page Checkout in Bricks Builder.

How Plan Cards Work

Two or more plans show as cards to pick from. A single plan shows no picker, and with the button layout it gets a one-line summary above the button instead.

  • Each card shows the plan name, its price and a short note: “One-time payment”, a free trial, a signup fee, or how often it renews.
  • A plan on sale shows the regular price struck through.
  • A plan that’s out of stock or can’t be bought shows “Unavailable” and can’t be picked. If no plan can be bought, the block says “This product is not available right now.”
  • Grouped and external products are skipped. A variable product adds every visible variation.
  • Products must be published. A private product shows only to users who can read private products.

If nothing in the block can be offered, anyone who can edit posts sees “On-page checkout: choose a published product or list its product or variation IDs. In a product template or a loop of products, it uses the current product.” Visitors see nothing.

Subscriptions and Savings Badges

Subscription products work as plans. The cards take their terms from the Subscriptions module, so they show what checkout charges: the price per period, such as “/ month” or “/ 3 months”, a free trial such as “14-day free trial”, and any signup fee. Set up the plans themselves as described in Create Subscription Products.

A plan billed every few months or yearly gets a “Save N%” badge when it costs less than a monthly plan of the same product in the block, over the same months. A $100 yearly plan next to a $10 monthly plan shows “Save 16%”. The percentage is rounded down, and without a monthly plan in the block there’s no badge.

Its Own Cart for Each Plan

Each plan checks out from its own cart, kept in the visitor’s session apart from the store cart. The mini-cart and cart page don’t change, and nothing from the store cart ends up in the order.

  • Switching plans keeps each plan’s form loaded, so switching back is instant.
  • Reloading the page picks up the same plan’s cart.
  • A visitor keeps up to six plan carts. Opening a seventh drops the oldest.
  • Only the cart is separate. The buyer’s details are shared with the rest of the store.
  • If another plugin replaces WooCommerce’s session handler, a plan checkout replaces the store cart instead, and Stackless logs a notice in WooCommerce → Status → Logs.

How the Form Loads

  • With the inline layout, the form loads as the block scrolls near the screen. With the button layout, it loads when the button is clicked.
  • The form is your checkout page’s own checkout: the Checkout block if the page uses it, otherwise the classic checkout, without your theme’s header and footer, and in the Checkout Builder layout the block names. It isn’t cached or indexed, and only your own site’s pages can embed it.
  • If it hasn’t loaded after 20 seconds, the block shows “Checkout could not load. Reload the page to try again.”
  • Without JavaScript, a “Continue to checkout” link adds the plan to the store cart and opens the checkout page.

What Happens After Payment

After Place order, the whole page moves to the receipt or the payment page, not just the embedded form. Hosted payment pages open in the full window too.

On the receipt, the store cart stays as it was. A form whose cart was already paid or has expired shows “This checkout has finished or expired. Reload the page to start again.”

Limit New Checkouts

Stackless → Settings → On-page Checkout has one setting:

  • New checkouts per connection: how many new plan carts one connection may open in ten minutes. Defaults to 30, up to 1,000. Reopening a plan doesn’t count, store managers aren’t limited, and 0 turns the limit off.

It stops bots from filling your sessions table. Over the limit, the form shows “Too many checkouts were opened from this connection. Wait a few minutes and reload the page.”

Limits

  • The block and shortcode show nothing on the checkout page itself.
  • Payment method classes belong to Modal Checkout. The on-page form shows the same payment methods as your checkout page.
  • Developers can change the plans with the stackless_on_page_checkout_plans filter, allow other product types with stackless_on_page_checkout_supports, and change the quantity cap with stackless_on_page_checkout_max_quantity.
  • A stackless:on-page-checkout event fires for select, ready, error and complete. The embedded page’s template can be overridden at yourtheme/stackless/on_page_checkout/frame.php.
Share

Was this helpful?

Still stuck? Open a support ticket