Stackless for WooCommerce
Checkout layouts, subscriptions, quotes and licensing for WooCommerce, in one plugin.
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.
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 On-page Checkout from the WooCommerce block category. The Product and plans panel picks what it sells:
The Display panel sets how it looks:
?coupon= code in the page address is applied.[stackless_checkout product="12" plans="34,35" default="35" layout="inline" quantity="no"]
| Attribute | What it does | Default |
|---|---|---|
product | A product ID. A variable product offers each variation. current uses the product the shortcode is rendered for. | the current product |
plans | Product or variation IDs in display order, separated by commas or spaces. Replaces product. | none |
default | ID of the plan picked first. | first available plan |
layout | inline shows the form, button shows a button that opens it in place. | inline |
design | The checkout look: inherit (the active Checkout Builder layout), none (no layout), or classic, split, warm-split, focused or review-first. | inherit |
button | Button text for the button layout. | Buy now |
title | A heading above the plans. | none |
quantity | yes adds the Quantity field. | no |
coupon | A coupon applied to the checkout, up to 64 characters. | none |
url_coupon | no 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.
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:
inherit, the default): whatever Checkout Builder has switched on. With no layout chosen there, the form keeps your store’s own checkout look.none): your checkout without a Checkout Builder layout. It fits narrow columns best. compact means the same.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.
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.
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.
For a step-by-step setup with screenshots, see Use On-page Checkout in Bricks Builder.
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.
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.
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.
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.
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.”
Stackless → Settings → On-page Checkout has one setting:
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.”
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.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.Still stuck? Open a support ticket