- Priority
- Informational Not scored. Reported for context only.
- Readiness level
- Not a level gate. It counts toward its section score.
- Platform
- Runs only when the scan recognises WooCommerce. On any other platform it is left out of the report and never scored.
- The question
- Do the cart and checkout pages use WooCommerce's Cart and Checkout blocks or the classic shortcodes?
On this page
In short
WooCommerce can render its cart and checkout pages in two ways: with the Cart and Checkout blocks, the default for stores started after WooCommerce 8.3 in November 2023, or with the classic [woocommerce_cart] and [woocommerce_checkout] shortcodes. This check records which one each page uses. It is informational and never scored, because agents that buy for a shopper work through the Store API, which stays the same either way.
What this check looks at
The cart page. The check finds the cart page in WooCommerce's own scripts, either in its settings script (storePages) or in its add-to-cart script (cart_url), on the home page or the first sampled product page. When neither names one, it tries /cart/. Then it reads the page as served with an empty cart:
| What the cart page contains | Cart type |
|---|---|
a wp-block-woocommerce-cart element | Cart block |
the woocommerce-cart-form form, or with an empty cart the wc-empty-cart-message notice | classic shortcode |
| neither | not recognised from the page |
The REST API. Many stores keep /cart/ and /checkout/ out of robots.txt, which the scanner honours. And with an empty cart, WooCommerce redirects the checkout page to the cart page, whether it uses the block or the shortcode. So the check reads the checkout page, and a cart page it could not read as served, through the WordPress REST API instead. It asks for wp/v2/pages/<id> with the page id that WooCommerce's settings script names, or for the page whose slug matches the page's address (cart and checkout by default). The Cart and Checkout blocks keep their wp-block-woocommerce-cart and wp-block-woocommerce-checkout wrappers in that content. Any other content is the classic shortcode, a page builder or a plugin.
The check makes at most four requests: a product page (often already fetched), the cart page, and the REST API for the cart and the checkout.
Why it matters for AI agents
The two kinds of page are built differently:
- The Cart and Checkout blocks render in the browser. The server sends a placeholder marked
is-loading, and JavaScript builds the cart or checkout form. An agent that reads HTML without running scripts sees no form on these pages. - The classic shortcodes render the cart table and the checkout form on the server.
Agents that buy for a shopper should not fill in either page. They use WooCommerce's Store API, which works the same under both. Guest checkout and cart API checks that. Browser agents, which click through the page like a person, can use both kinds of page.
The choice also matters when something breaks. WooCommerce notes that extensions not built for the blocks can be missing from the block checkout, such as a payment gateway that does not appear as a payment option. A store that switched recently should test its payment methods.
How the scanner decides
This check runs only when the scan recognised WooCommerce (see platform detection). It has weight info: it is reported, never scored, and gates no level.
- Pass: the cart type, the checkout type or both could be read. They appear at the top of the report next to the platform, for example "Cart: Cart block" and "Checkout: Checkout block". A type that could not be read is left out, and the message says why.
- Skipped: neither page could be read, for example because the cart page was not found and the REST API refuses anonymous reads (WordPress REST API readable).
How to fix it
There is nothing to fix. If you want to switch, WooCommerce documents both directions.
WordPress and WooCommerce
- Test on a staging copy first, and check that every payment gateway and checkout extension supports the blocks.
- To the blocks: edit the Cart page, select the Shortcode block and delete it, then insert the Cart block. Do the same on the Checkout page with the Checkout block.
- Back to the shortcodes: select the Cart or Checkout block and use the transform option "Classic Shortcode".
- Switch both pages together, because they work as a pair.
- Place a test order, then rescan.
Verify it yourself
Look at the cart page:
curl -s https://example.com/cart/ | grep -oE 'wp-block-woocommerce-cart[" ]|woocommerce-cart-form|wc-empty-cart-message' | sort | uniq -c
Look at the checkout page's content through the REST API (replace the slug if your checkout page has another address):
curl -s 'https://example.com/wp-json/wp/v2/pages?slug=checkout&_fields=id,content' | grep -o 'wp-block-woocommerce-checkout' | head -1
In the admin, open the Checkout page in the editor. A Checkout block shows the checkout form, and the classic version shows a Shortcode block with [woocommerce_checkout].
Common mistakes
- Opening the checkout page with an empty cart. WooCommerce redirects it to the cart, so the page you see is the cart. Add a product first, or read the page content as above.
- Mixing the two. A Cart block with a classic checkout, or the reverse, is possible but WooCommerce advises switching both together.
- Taking the mini cart for the Cart block. The mini cart in a block theme's header is a separate block (
wp-block-woocommerce-mini-cart). It says nothing about the cart page.
FAQ
How do I know if my WooCommerce store uses the Checkout block?
Open the Checkout page in the editor. The Checkout block shows a checkout form in the editor, while the classic checkout shows a Shortcode block containing [woocommerce_checkout]. Stores started after WooCommerce 8.3 use the blocks by default.
Is the Checkout block better for AI agents than the shortcode?
Neither is better for agents that buy through the Store API, which works the same under both. An agent that reads HTML sees the classic checkout form, but not the block checkout, which is built in the browser.
Why could the scanner not read my checkout type?
It reads the checkout page through the WordPress REST API. If a security plugin blocks anonymous REST requests, or the checkout page has a different slug and WooCommerce's settings script does not name it, the checkout type stays unknown.
Can I use the Cart block with the classic checkout?
Technically yes, but WooCommerce advises reverting or switching both pages together, because the cart and checkout work as a pair.
The fix in one step
Informational, nothing to fix. This check records whether the cart and checkout pages use WooCommerce's Cart and Checkout blocks or the classic shortcodes. Agents that buy for a shopper work through the Store API (B5.7), which either kind of page leaves in place.
Prompt for a coding agent
No change is needed: this check is informational and never fails. It records whether the store's cart and checkout pages use WooCommerce's Cart and Checkout blocks or the classic [woocommerce_cart] and [woocommerce_checkout] shortcodes (or a page builder or checkout plugin), as listed in the evidence. If the store owner wants to switch, follow WooCommerce's guide "Customizing the Cart and Checkout pages": to move to the blocks, delete the Shortcode block on each page and insert the Cart or Checkout block; to go back, transform each block to "Classic Shortcode". Switch both pages together, because they work as a pair. Before switching to the blocks, confirm that every payment gateway and checkout extension the store uses supports them, since an incompatible gateway may not appear as a payment option. Test a full order on a staging copy, then rescan. Do not change the Store API or guest checkout settings while doing this.
Sources and specifications
See how your store does
One scan runs every check in this knowledge base against your site and ends with a prioritised fix list.