Get a free 14-day trial on a wide range of WooCommerce Marketplace extensions and themes. Explore products

WooCommerce One Page Checkout

One Page Checkout displays product selection and checkout forms on a single product, Post or Page. Customers can add products to an order, or remove them, and complete payment without leaving the page.

For the rest of this documentation, when using the term post or posts, we are referring to both WordPress’s built-in post type and custom post types.

Usage

↑ Back to top

Before you begin, install and activate One Page Checkout and publish the products you want to sell. You can then add checkout in one of three ways.

  1. Enable One Page Checkout on a per-product basis.
  2. Add checkout to a page using a Shortcode block.
  3. Use the One Page Checkout graphical interface (Classic editor only).

Per-product setting

↑ Back to top

To enable One Page Checkout for a product, open the product in your dashboard and select One Page Checkout in the Product data panel. Save the product.

Once enabled, the checkout form appears on the product page. The Add to Order button no longer redirects to the checkout page, but will instead increase the product quantity by the specified number on the included checkout form. Other products that were added elsewhere are also visible, similar to how the normal checkout page works.

Add checkout to a page

↑ Back to top

In the WordPress block editor, add a Shortcode block and enter [woocommerce_one_page_checkout]. Use the One Page Checkout shortcode reference to choose products and a template. Preview the page and check that the products and checkout appear.

One Page Checkout graphical interface

↑ Back to top

If you have updated to WordPress 5.0, which introduced a new editor (formerly known as Gutenberg), only the Manual method will be available. The graphic interface is currently only available with the Classic Editor plugin.

To insert the One Page Checkout shortcode using the graphic interface:

  1. From your store’s WP Admin dashboard, navigate to Pages > Add New or Posts > Add New.
  2. Make sure the editor is in Visual mode.
  3. Select the One Page Checkout cart icon.
  4. Click inside the Products field and type the product name/s to display.
  5. Select the products to display.
  6. Select the template to use for product selection fields.
  7. Click Create Shortcode.

If the dialog is cut off, add the shortcode manually.

Additional content

↑ Back to top

Add content above or below the One Page Checkout shortcode in the WordPress editor to display sales copy, terms and conditions or other content above or below the One Page Checkout product selection and checkout form.

Choose products and a layout

↑ Back to top

Choose the products or categories to show and a layout for the selection. You can configure these options using the shortcode reference.

Product selection templates

↑ Back to top

One Page Checkout includes a number of templates for displaying the product selection fields at the top of the checkout form.

Product table template

↑ Back to top

The Product table template displays a row for each product containing its thumbnail, title and price. The style is based on the table displayed by default on the cart page.

This template is best for displaying a few products where the product images are helpful for making a choice, for example a set of Halloween masks.

Product list template

↑ Back to top

The Product list template displays a list of products with a radio button for selecting an option.

This template is useful when the customer does not need a description or photograph to choose which product to purchase, for example, different versions of an eBook.

Single product template

↑ Back to top

The Single product template displays each product in a very similar way to the standard product page of your site. This means it includes the product’s short description, images, gallery and other meta data.

Despite its name, the Single product template can be used to display two or more products. The name of the template is based on WooCommerce’s Single product template, which this template builds on. It is not named this way because it is limited to displaying only one product.

This template is suitable for displaying one or two products on a page and providing product information in the product selection fields, rather than custom content before the shortcode.

Single product template for variable products

The Single product template is also the only template to display the select boxes which allow a customer to choose different variations of a variable product. Other templates display each individual variation separately. The Single product template will display the variable product, not the individual variations.

Because of this, if you have a variable product with a large number of variations, this is the best template to use.

Note: Unlike other templates, you can not display a single variation using the Single product template. This template can only display the variable product. If you need to display only certain variations, you must use a different template.

This is also the only template which allows a customer to select a variation which does not have all attributes set. For example, if a variable product has a Size attribute, you can set the variations to use Any Size to allow the customer to choose from a large number of sizes without you having to create a variation for each size.

Note: The description displayed in this template is from the product’s short description, not the main product content.

Pricing table template

↑ Back to top

The built-in pricing table display products in a 2- to 5-column table with the product’s title, price ,and add-to-order input at the top, followed by the product’s attributes. If the products have a shipping weight and dimensions, these will also be displayed at the base of the table.

Configuring attributes for the pricing table

If you are not already familiar with product attributes, please read our guide to product attributes before continuing with this section.

The built-in pricing table template displays a list of each product’s attributes to make it possible to display each product’s features.

Both taxonomy attributes and custom product attributes will be displayed in the pricing table. Custom product attributes are easier to setup and configure for the pricing table. Taxonomy attributes are easier to maintain, especially if a lot of products will use the same attributes.

The attribute’s name will be displayed as a heading, and each of the attributes values will be displayed as a list item.

For example, give each simple product a visible Color attribute and a visible Features attribute. The pricing table displays each attribute’s name and values under its product.

Tip: If one or more products have fewer attributes than the others — and therefore smaller column height — position it/them to the right of the other products by including it after the other products in the shortcode’s product IDs attribute.

Visibility of attributes on the pricing table

It is possible to choose which attributes to display on the pricing table using WooCommerce’s built-in Visibility setting for attributes.

To display attributes in the pricing table:

  1. Go to: Edit Product.
  2. Click Attributes tab of the Product Data meta box.
  3. Click Visible on the product page checkbox.
  4. Save the product.

To hide attributes from the pricing table, keep the Visible on the product page box unchecked.

Easy Pricing Tables

↑ Back to top

One Page Checkout’s Easy Pricing Table template uses the legacy Easy Pricing Tables integration. A new installation of the free Easy Pricing Tables 4.1.3 plugin does not enable that legacy integration by default. For a new setup, use One Page Checkout’s built-in pricing table template instead. If you use an existing legacy table, follow the legacy table instructions and test it on a staging site before updating either plugin.

Use an existing premium toggle

If you already use a premium toggle from the Easy Pricing Tables legacy builder, follow Fatcat Apps’ instructions for adding the toggle shortcode. Keep the toggle shortcode and [woocommerce_one_page_checkout] in separate Shortcode blocks. Leave the product and template attributes off the checkout shortcode when the tables supply the product buttons. Test each table on a staging site and confirm that selecting a product adds it to the checkout.

Creating custom product selection templates

↑ Back to top

For instructions and code, see Create a custom product selection template for One Page Checkout.

Extension compatibility

↑ Back to top

These extensions have been tested and are compatible with WooCommerce One Page Checkout based on the different product selection templates:

ExtensionSingle ProductProduct TableProduct ListPricing TableEasy Pricing Tables
Account Funds✔––––
Bookings✔––––
Chained Products✔✔✔✔✔
Checkout Field Editor✔✔✔✔✔
Composite Products✔––––
Min/Max Quantities✔✔✔✔✔
Name Your Price✔✔–✔–
Postcode/Address Validation✔✔✔✔✔
Product Add-ons✔**––––
Product Bundles✔––––
Smart Coupons✔✔✔✔✔
Subscriptions✔✔✔✔✔
Table Rate Shipping✔✔✔✔✔
WooCommerce Checkout Add-ons✔✔✔✔✔
WooCommerce Deposits✔––––

**The Product Add-On File Upload field type is not supported.

Because WooCommerce One Page Checkout uses a custom template for product selection fields, it will reduce the out-of-the-box compatibility with many other extensions.

If you want One Page Checkout to work with another extension, please request a feature.

Payment gateway compatibility

↑ Back to top

WooCommerce One Page Checkout should work with any WooCommerce payment gateway extension that uses the normal WooCommerce payment section.

Settings screen

↑ Back to top

Auto-scroll

↑ Back to top

When cart items change, One Page Checkout can scroll to notifications that are outside the visible part of the page. This setting is enabled by default.

To change this behavior, go to WooCommerce > Settings > One Page Checkout, select or clear Enable auto-scroll, and save your changes. Notifications still appear when auto-scroll is disabled.

FAQ

↑ Back to top

Can I include other content on the page?

↑ Back to top

Yes! If you include content above or below the shortcode, that content will be displayed on the checkout page normally. Remember that any content below the shortcode will render after the checkout fields.

You can include video, images, text, HTML, and any other content you would normally display on a post or page.

How can I customize the checkout form?

↑ Back to top

Your theme’s default checkout template will be used to display the checkout fields on any page or post with One Page Checkout shortcode.

You can add or remove fields on the checkout form with a custom checkout template, or a WooCommerce extension like Checkout Field Editor.

Why do some products have an Add to Order button while others have quantity input?

↑ Back to top

The built-in templates decide whether to display the add to order button or a quantity input based on whether the product is set to be Sold Individually on the Inventory tab.

If the product is sold individually, then a button input is used (as only one of these products can be added to each order). If the product is not set to be sold individually, then the WooCommerce quantity input is displayed to allow the customer to add larger quantities of the product to their order.

Set a product to be sold individually (and therefore, display a button rather than quantity input) on the Inventory tab of the Edit Product screen.

How are variable and grouped products displayed?

↑ Back to top

With the exception of the Single product template, the built-in product selection templates currently only support displaying individual products. For product containers, which include multiple different products, like variable products or grouped products, each individual child product will be displayed separately.

Similarly, if you add a grouped product, each of the simple products grouped within that product will be displayed separately (e.g. as a separate row in the table).

From One Page Checkout version 1.1 onward, the Simple product template displays variable products with select boxes for the customer to choose a variation, like the normal single product template bundled by default with WooCommerce. Because of this, it can not be used to display a single variation and instead, the containing variable product must be displayed.

For example, the Product list template displays each variation separately and appends its attributes to the product title.

Why aren’t my variations displaying?

↑ Back to top

If you add a variable product to a shortcode using a template other than the Single product template, each of its variations will be displayed individually. For example, as a separate column in the Pricing table template or a separate row in the Product table template.

Because of this, only variations which have a value set for all attributes can be displayed in these templates.

A variation with an attribute value left unset requires the customer to choose a specific value. The other templates omit it because not all of its attributes are set. The Single product template is the only template that allows for this.

On the other hand, if you are trying to display only specific variations using the Single product template by entering the variations’ IDs in the shortcode, these variations will not be displayed because the Single product template only displays variable products, not individual variations. If you want to display individual variations, you need to either choose a different template or you can create a distinct product with the same attributes to use with the Single product template.

Can I insert two checkout shortcodes on one page?

↑ Back to top

No, only one shortcode will work per page.

Why don’t the product selection fields display?

↑ Back to top

If the selected products do not exist or are out of stock, they will not be displayed for selection.

Alternatively, if you are using a custom product selection field template that does not correctly display the products, the fields may not display.

Why doesn’t my custom template work?

↑ Back to top

Ask your developer to review the setup and troubleshooting steps in Create a custom product selection template for One Page Checkout.

Does One Page Checkout replace WooCommerce’s checkout page?

↑ Back to top

No. The WooCommerce cart and checkout pages work independently of One Page Checkout. Existing WooCommerce cart and checkout shortcodes are not affected by One Page Checkout.

The checkout page is still required. It is used to display receipt and order confirmation to customers, so keep the existing checkout page and its checkout content in place. However, as you can use the One Page Checkout shortcode on any page, you can replace any links in your menus or elsewhere on your site with links to your custom checkout page.

When will shipping fields be displayed?

↑ Back to top

Shipping address fields depend on the products in the cart and your store’s shipping settings.

If a product requires shipping, shipping address fields can be displayed when shipping is enabled and your store’s shipping settings allow a separate shipping address.

How can I include add-to-cart buttons outside of One Page Checkout?

↑ Back to top

To let customers select products without reloading the page, use a built-in product selection template.

You can also link a button elsewhere on the page to an add-to-cart URL. See Creating WooCommerce add-to-cart URLs and use the One Page Checkout page as the destination. This method reloads the page. Test the link on a staging site and check that it adds the intended product and displays the checkout; your store’s redirect settings can affect where the customer lands.

Do I still need WooCommerce’s cart and checkout pages?

↑ Back to top

Yes. Although One Page Checkout allows customers to check out on other pages, WooCommerce’s checkout page is still required to display receipt and order confirmation to customers. Some extension and payment gateways, like PayPal Standard, also require WooCommerce’s normal cart and checkout pages in order to work correctly.

Your store still requires all WooCommerce pages to be seup — including the Cart and Checkout pages — even when One Page Checkout is used to display checkout on another page.

Why aren’t my products displaying on the One Page Checkout page?

↑ Back to top

Check that your products are published. If your shortcode selects products by category, set their catalog visibility to Shop and search results. To select a published product directly, use its ID in the product_ids attribute.

Note: Hidden products will display on the One Page Checkout form if using a shortcode that specifies product IDs.

Can I render the checkout shortcode dynamically?

↑ Back to top

For the standard setup, add the One Page Checkout shortcode to a Shortcode block in the page content. Rendering it dynamically through custom code may require additional development. Test the checkout and product selection on a staging site before using a custom integration for live orders.

Why is the cart emptied before adding new products from a radio input or Easy Pricing Table?

↑ Back to top

Radio input elements are used to choose one of a set of options. Because of this, when a radio element is used in the product selection fields, One Page Checkout will empty the cart before adding new products to the cart.

The same logic is applied to product selection fields in Easy Pricing Tables. Usually, pricing tables are used to display different options for the one product, like differently priced levels for a software-as-a-service (SaaS) subscription. Because of this, One Page Checkout removes the existing items before adding the newly selected item.

To change this behavior, use the free WooCommerce One Page Checkout – Do Not Empty Cart extension.

One Page Checkout slow or not working?

↑ Back to top

Follow our troubleshooting steps.

Further reading

↑ Back to top

Questions and support

↑ Back to top

Something missing from this documentation? Still have questions and need assistance?

  • If you have a question about a specific extension or theme you’d like to purchase, contact us to get answers.
  • If you already purchased this product and need some assistance, get in touch with a Happiness Engineer via our support page and select this product’s name from the Product dropdown.

Related Products

WooCommerce Subscriptions is a WooCommerce extension that lets customers subscribe to your products or...

Power your membership association, online magazine, elearning sites, and more with access control to...

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.