The Complete List of WooCommerce Shortcodes

The Complete List of WooCommerce Shortcodes

WooCommerce ships with a handful of built-in shortcodes that predate the block editor and still work today. This is the full list, straight from WooCommerce core, with what each one does and how to use it.

The Code

[woocommerce_cart]
Displays the cart page: items, quantities, coupon field, and totals.

[woocommerce_checkout]
Displays the checkout page: billing, shipping, order review, and payment methods.

[woocommerce_my_account]
Displays the My Account area: order history, addresses, account details, and the login/registration form for guests.

[woocommerce_order_tracking]
Displays a form where a guest can look up an order by order number and billing email.

[product_page id="99"]
Displays a full single product page for a specific product, by ID or SKU, anywhere on the site.

[products limit="8" columns="4" category="hoodies"]
Displays a grid of products filtered by the attributes you pass in: category, tag, SKU, featured status, and more.

[product_category category="hoodies" per_page="12"]
Displays products from one specific category.

[product_categories number="12" columns="4"]
Displays a grid of category thumbnails instead of individual products.

[add_to_cart id="99"]
Displays a standalone add-to-cart button for a specific product, usable outside the shop page.

[add_to_cart_url id="99"]
Doesn’t render a button. Outputs the raw add-to-cart URL for the product, useful when you need the link itself, for example inside an email or a custom button.

[shop_messages]
Displays WooCommerce notices (added to cart, errors, coupon applied) on a page that isn’t normally part of the WooCommerce flow.

Where to Put This Code

All of these are content shortcodes. They go directly into the page or post content, not into functions.php. In the block editor, paste the shortcode into a dedicated Shortcode block, not a Paragraph block, since some WooCommerce versions render raw shortcode text instead of executing it inside a Paragraph block.

The four page shortcodes, [woocommerce_cart], [woocommerce_checkout], [woocommerce_my_account], and [woocommerce_order_tracking], are typically already placed on their respective pages when WooCommerce’s setup wizard runs. You usually only touch these manually when troubleshooting a page that lost its shortcode, or when rebuilding a page from scratch.

WooCommerce has been shifting toward block-based alternatives for several of these (Cart block, Checkout block, Product Collection block). The shortcodes still work and aren’t deprecated, but if you’re starting a build from scratch on a block theme, the blocks give you more layout control without custom CSS.

Parameters Worth Knowing

[products] is the most flexible and the one worth learning attributes for. Common ones: limit (how many to show), columns (grid width), category (filter by category slug), orderby (price, popularity, date, rating), on_sale (true/false to show only discounted products).

[product_page] needs either id or sku to know which product to render. Without one of those two, it has nothing to display.

[add_to_cart] accepts id, sku, style (for inline CSS), and show_price (true/false), letting you drop a bare button anywhere without pulling in the rest of the product page.

[product_categories] accepts ids to show only specific categories instead of all of them, which is useful for a curated homepage section instead of a full category index.

Real Use Cases

Featuring a specific product inside a blog post. [product_page id="X"] or [add_to_cart id="X"] lets you sell directly from editorial content without linking away to the shop.

A curated product grid on a landing page. [products category="summer-sale" limit="6"] builds a filtered grid without needing a page builder module or a custom query.

A guest order tracking page separate from the standard My Account flow. Some stores want a simpler, standalone lookup page for guests instead of pushing them toward account creation. [woocommerce_order_tracking] on its own page does exactly that.

Displaying cart or checkout notices on a custom page. If a redirect flow sends customers through a non-WooCommerce page mid-checkout, [shop_messages] makes sure error or success notices still show up instead of disappearing silently.

Common Issues

A shortcode renders as literal text instead of running. This usually means it was pasted into a Paragraph block instead of a Shortcode block, or a plugin caching the page content is serving a stale, pre-render version.

[products] shows nothing. Double-check the attribute values, especially category, which expects the category slug, not the display name. category="Hoodies" with a capital H and no matching slug returns an empty grid.

Page shortcodes (cart, checkout, my_account) show a blank page. The shortcode alone isn’t enough for these four. Each one needs its page explicitly assigned under WooCommerce → Settings → Advanced → Page setup, or the background processes tied to that page won’t run correctly even if content displays.

Shortcodes stopped working after a theme or page builder change. Some page builders wrap content in a way that strips or escapes shortcodes before WordPress can process them. If a shortcode worked before a redesign and doesn’t now, check whether the page is still using standard WordPress content or has been converted to a builder-specific format.

If your store needs a shortcode-driven layout that goes beyond what’s built in, custom filtering logic, dynamic pricing displays, or product grids pulling from multiple conditions at once, that’s exactly the kind of work Fixelar handles as part of our WooCommerce custom development services. We build it to match your exact catalog structure, not a generic template.