WooCommerce Checkout Shortcode: The Complete Guide (2026)
Table of Contents
If you have ever set up a WooCommerce store, you have almost certainly encountered the [woocommerce_checkout] shortcode β a single line of text that tells WordPress to render a fully functional checkout form on any page. For years it was the only way to create a WooCommerce checkout page, and millions of stores still rely on it today.
But WooCommerce has changed. Since version 8.3 (released late 2023), new WooCommerce installations default to the Checkout Block β a Gutenberg-native experience that replaces the shortcode with a drag-and-drop block editor layout. Both approaches still work in 2026, but WooCommerceβs own developer documentation is clear that going forward, most development effort goes into the blocks β the shortcode continues to receive bug fixes, not active feature development. The question is which one belongs on your store, and what to do when things go wrong.
This guide covers everything: what the shortcode does, how it compares to the block, how to add or restore it, the other key WooCommerce shortcodes, troubleshooting steps, and how AI tools like Easy MCP AI can automate the store management work around it.
What Is the [woocommerce_checkout] Shortcode?
[woocommerce_checkout] is a WooCommerce page shortcode that renders the complete checkout experience β billing fields, shipping fields, order summary, payment method selector, and the place order button β wherever it is placed on a WordPress page.
WooCommerce automatically creates a Checkout page during installation and populates it with this shortcode. The page ID is then registered under WooCommerce β Settings β Advanced β Page Setup, so WooCommerce knows where to send customers who are ready to pay.
The shortcode itself takes no attributes. It is simply:
[woocommerce_checkout]
Under the hood it calls the classic PHP checkout template (woocommerce/templates/checkout/form-checkout.php), which is highly hookable. Hundreds of payment gateways and checkout-extension plugins add their fields using PHP actions and filters that only fire in the classic template β which is a key reason many stores still prefer the shortcode over the Checkout Block.
Shortcode vs. Checkout Block: Which Should You Use?
WooCommerce 8.3 (November 2023) made the Checkout Block the default for new stores. The block is built with React/JavaScript and offers a visual drag-and-drop layout in the Gutenberg editor, mobile-optimised rendering, and integration with express payment options like Apple Pay and WooPay.
Here is how the two approaches compare in practice:
| Factor | [woocommerce_checkout] Shortcode | Checkout Block |
|---|---|---|
| Default since | WooCommerce launch (legacy) | WooCommerce 8.3 (Nov 2023) |
| Editor support | Classic Editor or Shortcode Block | Gutenberg block editor |
| Plugin compatibility | Very broad β most extensions support it | Growing; some older extensions not yet compatible |
| Customisation | PHP hooks (actions/filters) | JavaScript extensibility API |
| Visual editing | None without a page builder | Yes, live drag-and-drop |
| Performance | Depends on theme/caching | Generally faster on modern themes |
| Express payments | Plugin-dependent | Apple Pay, WooPay, etc. built in |
Use the shortcode if your store relies on payment gateways or checkout extensions that have not been updated for block compatibility. Many well-established plugins still hook into classic PHP actions that the Checkout Block does not fire. Reverting to the shortcode is a legitimate, working choice β WooCommerce continues to ship bug fixes for it, even though new feature work is focused on the blocks.
Use the Checkout Block if you are launching a new store, your theme supports Full Site Editing, and your payment and shipping plugins are block-compatible. The block is the direction WooCommerce is heading, and block-compatible plugin support has broadened since 2023 β though as of 2026 some extensions (certain payment gateways and checkout add-ons) still havenβt shipped block-compatible versions, so itβs worth checking your specific plugins before switching.
How to Add or Restore the Checkout Shortcode
Scenario 1: Add it to a page manually
- Go to Pages β Add New (or edit your existing Checkout page).
- In the Gutenberg editor, click the + block inserter and search for Shortcode.
- Insert the Shortcode block, then type
[woocommerce_checkout]inside it. - Publish or update the page.
- Go to WooCommerce β Settings β Advanced β Page Setup and confirm the Checkout page field points to this page.
If you are using the Classic Editor plugin, paste the shortcode directly into the page content area β no wrapper block needed.
Scenario 2: Revert from Checkout Block to shortcode
If your store is using the Checkout Block and you want to switch back to the shortcode for compatibility reasons:
- Edit your Checkout page in WordPress.
- Select and delete the Checkout block.
- Insert a Shortcode block and type
[woocommerce_checkout]. - Update the page and test a purchase flow end-to-end.
WooCommerce stores the checkout page reference by page ID, not by which content method you use, so no settings change is needed as long as it is the same page.
Scenario 3: Checkout page was deleted
If the Checkout page is missing entirely:
- Create a new page titled Checkout.
- Add the
[woocommerce_checkout]shortcode as above. - Go to WooCommerce β Settings β Advanced β Page Setup.
- Set the Checkout page field to your new page and save.
Other Key WooCommerce Shortcodes
WooCommerce ships with several page shortcodes alongside the checkout one. Per the official WooCommerce shortcodes documentation, the main ones are:
| Shortcode | What It Displays | Block Alternative |
|---|---|---|
[woocommerce_checkout] | The full checkout form | Checkout Block |
[woocommerce_cart] | The shopping cart page | Cart Block |
[woocommerce_my_account] | Customer account dashboard | None yet |
[woocommerce_order_tracking] | Order tracking form | None |
[products] | Product grids with many filter attributes | Product Collection Block |
[product_page id="X"] | A single full product page by ID or SKU | Custom product page templates |
[product_category] | Products within a specific category | Product Collection Block |
[product_categories] | A grid of product category thumbnails | Product Categories Block |
[add_to_cart id="X"] | Add-to-cart button for one product | Single product page templates |
[add_to_cart_url id="X"] | The raw add-to-cart URL for one product | β |
[shop_messages] | Cart/checkout notices (errors, success messages) | Handled automatically by blocks |
WooCommerce notes that blocks are now the preferred approach for product display, with the Product Collection block replacing several older product shortcodes. The page shortcodes ([woocommerce_checkout], [woocommerce_cart], [woocommerce_my_account]) remain first-class features with no announced deprecation.
Customising the Checkout Page
Whether you use the shortcode or the block, there are several ways to customise checkout.
With the shortcode (classic method):
- Use the
woocommerce_checkout_fieldsfilter in PHP to add, remove, or reorder billing and shipping fields. - Use
woocommerce_before_checkout_formandwoocommerce_after_checkout_formaction hooks to inject content. - Most checkout field editor plugins (e.g., Checkout Field Editor by ThemeHigh) were built for the classic shortcode template; the more established ones have since added partial Checkout Block support too, so check a given pluginβs current compatibility before relying on it.
With the Checkout Block:
- Use the Gutenberg editor to drag and rearrange inner blocks (Billing Details, Shipping Details, Payment Options, Order Summary, Coupons).
- Use the WooCommerce extensibility API (JavaScript-based) to add custom fields or logic.
- Use the block settings sidebar to toggle express payment options, local pickup, and newsletter opt-ins.
Troubleshooting: Checkout Page Not Working
If your WooCommerce checkout page is broken or returns an error, work through these steps:
1. Confirm the page assignment. Go to WooCommerce β Settings β Advanced β Page Setup. Make sure the Checkout field points to the correct page and that page contains either the shortcode or the Checkout Block.
2. Check for plugin conflicts. Deactivate all plugins except WooCommerce, test checkout, then reactivate one at a time. Payment gateway plugins are common culprits when mixing shortcode and block checkout.
3. Check for theme conflicts. Switch to a default WordPress theme (e.g., Storefront or Twenty Twenty-Four) and test. Some themes override checkout templates.
4. Verify permalink settings. Go to Settings β Permalinks and click Save Changes (no change needed β this flushes rewrite rules). Checkout pages sometimes break after permalink changes.
5. Clear caches. If you use a caching plugin or Cloudflare, purge all caches. Cached versions of the checkout page can cause session and nonce errors.
6. Check SSL. WooCommerce requires HTTPS on the checkout page. A mixed-content warning or missing SSL certificate will block checkout from loading correctly.
7. Inspect the page content. Edit the Checkout page and confirm it contains [woocommerce_checkout] (in a Shortcode block) or the Checkout Block. It is possible a page builder or editor accidentally cleared the content.
8. Review WooCommerce status. Go to WooCommerce β Status β System Status and look for any red flags β outdated templates, missing pages, or PHP version warnings.
AI Store Management via Easy MCP AI
Getting your checkout page set up correctly is one part of running a WooCommerce store. The day-to-day work β managing products, updating inventory, processing orders, and publishing pages β is where most of the time goes.
Easy MCP AI is a free, open-source WordPress plugin that turns your WordPress site into a fully compliant remote MCP server, allowing AI clients like Claude, ChatGPT, Cursor, and n8n to read and write your store data through natural language. It runs self-hosted on your server with no Node.js or proxy required, and it includes 46 dedicated WooCommerce tools out of its 242 total tools.
Easy MCP AI does not modify checkout code or templates β that is WordPress/WooCommerceβs domain. What it does is handle the surrounding store operations that take up the most time.
Here are two examples of what you can do once Easy MCP AI is connected to Claude or another MCP-compatible client:
Example prompt 1 β Publish your checkout page and configure it:
βCreate a new WordPress page called βCheckoutβ with the slug
/checkout, set its status to published, and add the text[woocommerce_checkout]as the page content.β
Easy MCP AIβs page creation tools handle this via natural language, skipping the WordPress admin UI entirely.
Example prompt 2 β Audit your WooCommerce product catalogue before a sale:
βList all WooCommerce products where stock quantity is below 5 and status is published. Show me the product name, SKU, price, and current stock for each one.β
With 46 WooCommerce tools covering products, orders, customers, coupons, and shipping zones, Easy MCP AI makes it possible to manage a WooCommerce store through conversation rather than clicking through admin screens. See the full list of tools and read the WooCommerce MCP integration guide for a deeper look.
Security is handled with SHA-256-hashed API tokens, OAuth 2.1 authentication, and per-tool capability scoping β the plugin itself runs entirely on your server.
Key Facts
[woocommerce_checkout]is the classic shortcode that renders the full WooCommerce checkout form on any page.- Since WooCommerce 8.3 (November 2023), new installations default to the Checkout Block instead of the shortcode.
- Both approaches still work in 2026, but WooCommerceβs own docs say new feature development is focused on the blocks; the shortcode gets bug fixes only.
- The shortcode uses PHP hooks (actions/filters); the Checkout Block uses a JavaScript extensibility API β this is the main compatibility difference for third-party plugins.
- The Checkout page must be registered under WooCommerce β Settings β Advanced β Page Setup regardless of which method you use.
- Common checkout issues: deleted page, missing page assignment, plugin conflict, or cached page serving a stale version.
Conclusion
The [woocommerce_checkout] shortcode has been the backbone of WooCommerce checkout pages since the plugin launched, and it remains a completely valid choice in 2026 β especially for stores that depend on payment gateway plugins built around classic PHP hooks. The Checkout Block is the modern default and offers better visual editing and express payment support, but it requires compatible plugins and a Gutenberg-friendly theme.
Knowing how to add, restore, and troubleshoot the checkout shortcode is an essential skill for any WooCommerce store owner or developer. And if you want to reduce the manual admin work that surrounds your store β product updates, order management, page publishing β Easy MCP AIβs 46 WooCommerce tools let you handle it through natural language with any MCP-compatible AI client.
Get Easy MCP AI from the WordPress plugin directory
Official Sources
- Shortcodes included with WooCommerce β woocommerce.com
- Customising Cart and Checkout with Blocks β woocommerce.com
- WooCommerce Checkout Block β woocommerce.com
- WooCommerce Blocks source β GitHub (the standalone WooCommerce Blocks plugin was merged into WooCommerce core and its WordPress.org listing closed in February 2024)
- Easy MCP AI β wordpress.org