Use the WooCommerce One Page Checkout shortcode to display a checkout and, optionally, a selection of products on a page. This reference describes the product, category, and template attributes. Test changes on a staging site before using them for live orders.
Before you start
↑ Back to topInstall and activate WooCommerce and WooCommerce One Page Checkout. Have the IDs of the products or product categories you want to display. Product availability, checkout settings, your theme, and other extensions can affect the resulting page.
Add a checkout
↑ Back to topAdd a Shortcode block to the page and enter:
[woocommerce_one_page_checkout]
Without product or category IDs, the shortcode displays the checkout without a product selection supplied by those attributes. Existing cart items can still appear in the order.
Select products
↑ Back to topUse product_ids for a comma-separated list of product IDs. Replace the example IDs with IDs from your store.
[woocommerce_one_page_checkout product_ids="30,45,12"]
Select product categories
↑ Back to topUse category_ids for a comma-separated list of product category IDs. Replace the example IDs with IDs from your store.
[woocommerce_one_page_checkout category_ids="27,11,45"]
If both attributes have values, One Page Checkout uses product_ids for the selection. Use one attribute when you want to make the selection rule clear.
Choose a product selection template
↑ Back to topUse the template attribute to choose a built-in template. The available values are product-table, product-list, product-single, and pricing-table.
[woocommerce_one_page_checkout product_ids="30,45" template="pricing-table"]
See Product selection templates for a description of each layout. Developers can also create a custom product selection template.
Use a legacy Easy Pricing Table
↑ Back to topOne Page Checkout can use the legacy Easy Pricing Tables template. In the free Easy Pricing Tables 4.1.3 plugin, the legacy builder must be available. A new installation without legacy tables does not enable it automatically. For a new setup, consider the built-in pricing-table template instead.
For an existing legacy table, set each table button to an add-to-cart URL for the intended product. Replace the example table ID with your own:
[woocommerce_one_page_checkout template="easy_pricing_table" easy_pricing_table_id="454"]
Test the table on a staging site. Confirm that selecting a button adds the intended product to the order and that checkout displays correctly. Check existing integrations before updating either plugin.
Verify and troubleshoot
↑ Back to topPreview the page on a staging site. Confirm that the intended products and checkout appear, and test adding and removing an item without placing a real payment. If the selection is empty, check the IDs, product status and availability, and the selected template. If you use product IDs and category IDs together, check which selection takes precedence. For further help, see One Page Checkout troubleshooting.