You found a WooCommerce shortcode in a tutorial, pasted it into a page, and now you want to know two things. Does it still work, and is it the right tool for a store you build in 2026? Most shortcode guides answer neither question.
They list every WooCommerce shortcode as if all of them had the same status, and they do not. Some are still the fastest tool for the job. Some still work, but a block has replaced them on new stores. A few have no block at all, so the shortcode is the only option. The difference matters most for the cart and checkout shortcodes, because people copy them the most and WooCommerce has moved them to blocks.
This guide sorts the shortcodes by status first. Then it covers the page shortcodes (cart, checkout, my account and order tracking) and the product shortcodes you will use most, including featured products. We checked every shortcode and attribute against WooCommerce’s own shortcode documentation and the WooCommerce 11.3.1 code on 27 November 2026.
Table of Contents
Which WooCommerce shortcodes still matter in 2026
The short version: the product shortcodes are still current and worth learning. The cart and checkout shortcodes have block replacements, and WooCommerce uses those blocks by default on new stores since version 8.3. WooCommerce has not removed any of these shortcodes, so every page you already built on one keeps working.
Here is every shortcode on WooCommerce’s main list, with its block alternative and its status.
| Shortcode | What it does | Block alternative | Status |
|---|---|---|---|
[products] | Displays products by parameters, with attributes | Product Collection block and others | Current, still the quickest route inside a post |
[product_page] | Displays a full single product page by ID or SKU | Custom product page templates in the site editor | Current |
[product_category] | Displays products in a category, with attributes | Product Collection block | Current |
[product_categories] | Displays product categories, with attributes | None yet | Current, and the only option |
[add_to_cart] | Displays an add-to-cart button and price for a product | Available on single product page templates | Current |
[add_to_cart_url] | Returns the add-to-cart URL for a product | None | Current, and the only option |
[shop_messages] | Shows shop notices on non-WooCommerce pages | Store Notices block | Current |
[woocommerce_cart] | Displays the cart page | Cart block | Legacy, works, replaced for new stores |
[woocommerce_checkout] | Displays the checkout page | Checkout block | Legacy, works, replaced for new stores |
[woocommerce_my_account] | Displays the account page | None yet | Current, and the only option |
[woocommerce_order_tracking] | Displays the order tracking form | None | Current, and the only option |
Read the last column carefully, because most guides skip it. Four of these shortcodes have no block equivalent, so they are not legacy at all. Only two have a real replacement, and both of those still work.
WooCommerce also still runs a few shortcodes that are not on that list: [related_products], [product], and the older product list shortcodes such as [featured_products] and [sale_products]. We cover them in the product section below.
The page shortcodes, and what replaced them
Four shortcodes build the store’s working pages, from the cart through to order tracking. WooCommerce creates the cart, checkout and my account pages for you when you set up the store. It records which page is which in its own settings, so these pages are usually in place before you think about them.

If one of these pages goes missing, or you rebuild it by hand, you can add the shortcode back yourself. Open the page in the block editor, add a Shortcode block, and paste the shortcode into it. In the Classic Editor, paste the shortcode straight into the content.
The WooCommerce cart shortcode
The cart shortcode is [woocommerce_cart]. It shows the items in the cart, the coupon code field and the basic order totals. It takes no attributes.
The Cart block replaces [woocommerce_cart]. Since WooCommerce 8.3, a new install builds its cart page with the Cart block, not the shortcode. If your store is older, your cart page may still hold the shortcode, and it keeps working.
The WooCommerce checkout shortcode
The checkout shortcode is [woocommerce_checkout]. It shows the full checkout process: billing and shipping fields, the order review and the payment options. It also takes no attributes.
The Checkout block replaces [woocommerce_checkout]. Like the Cart block, it is the default on new installs since WooCommerce 8.3. WooCommerce now recommends the cart and checkout blocks, which it calls conversion optimized. It also notes that in some cases the shortcode versions work better with extensions. That is the main reason to keep the shortcode: a payment gateway or checkout add-on you rely on that does not support the Checkout block yet.
Use one checkout per store. If your checkout page already holds the Checkout block, do not add [woocommerce_checkout] to a second page and expect both to behave the same way.
The WooCommerce my account shortcode
The my account shortcode is [woocommerce_my_account]. A logged-in customer sees their past orders and can update their details there. A guest sees a login form, plus a registration form if you turned registration on in the Accounts and Privacy settings.
There is no block for the my account page. WooCommerce’s documentation says so directly, so this shortcode is still the only way to build the page. Old tutorials sometimes add an order_count attribute to it. WooCommerce deprecated that attribute in version 2.6 and keeps it only for backward compatibility, so leave it out.
The WooCommerce order tracking shortcode
The order tracking shortcode is [woocommerce_order_tracking]. It shows a form where a customer enters their order number and billing email to see the status and details of the order. It takes no attributes.
Unlike the other three, this page is optional, and WooCommerce does not create it for you. It is most useful for guests who checked out without an account. WooCommerce’s own example puts the form on the my account page, so guests find it next to the login form. There is no block for it, so the shortcode is the only option.
Shop notices and the shop page
[shop_messages] is the most useful shortcode most people have never used. WooCommerce notices, such as “product has been added to cart” or a coupon message, only show on WooCommerce pages by default. Add [shop_messages] to a custom landing page with an add-to-cart button, and the notices show there too. The Store Notices block does the same job in block templates.
Many people also search for a shop page shortcode. There is none. The shop page is a product archive, and you pick it under WooCommerce, Settings, Products. If you want a shop-style grid on another page, use [products limit="12" columns="4" paginate="true"], which gives you a paged grid of products anywhere.
Blocks or shortcodes: how to choose
The rule is easy to remember. On a new store, use the blocks. On an existing store that runs on shortcodes, leave it alone until you have a reason to change. To drop products into a post or a landing page, use the shortcode, because it is still faster than the block.
People underestimate that last case. A shortcode is a single line you can type, put in a template or generate with code. The equivalent block takes several clicks and you cannot paste it into a text field. That matters when you build thirty category pages, not one.
The cart and checkout need more thought than the rest, because WooCommerce builds its newer checkout work on the blocks. A store on the shortcode versions does not break, but it can fall behind over time. If you want to go the other way and bring back the classic shortcode experience, our documentation on switching cart and checkout blocks to the classic shortcodes walks through it.
Check your theme before you change anything. Block themes expect block templates, while a classic theme usually works best with the shortcode pages. Botiga supports both routes, and our fastest WooCommerce themes comparison covers how the other options handle it.
The product shortcodes worth knowing
You will use these regularly, because they put products inside ordinary posts and pages. The shop templates cannot do that on their own.
Show a grid of products
[products] is the main product shortcode. On its own, it lists your products. The attributes give you the control.
Learn these five first. Use limit to set how many products to show. The grid width comes from columns, which defaults to 4. Sorting uses orderby for the field and order for the direction, ASC or DESC. For a long list, turn on paginate, which works together with limit.
The orderby attribute accepts title, date, id, menu_order, popularity, rand and rating, so most sorting you want is already built in. Be careful with rand: on a site with page caching, the “random” order can get stuck.
A four-column grid of your twelve newest products looks like this.
[products limit="12" columns="4" orderby="date" order="DESC"]
You can also pick exact products with ids or skus, which both take a comma-separated list. Add a class attribute when you want to style one grid differently from the others with your own CSS.
Filter by category, sale or rating
The same shortcode filters as well as lists. category and tag both take comma-separated slugs, so one line gives you every product in a category without touching a template.
[products category="hoodies,t-shirts" limit="8" columns="4"]
By default, a product in any of the listed categories shows. Add cat_operator="AND" to show only products that are in all of them, or cat_operator="NOT IN" to leave those categories out. tag_operator works the same way for tags.
Three attributes act as filters on their own. on_sale pulls products that are on sale, best_selling pulls by number of sales, and top_rated pulls by average rating. Set the one you want to true. WooCommerce’s documentation says not to combine these three with each other, so use one per shortcode.
[product_category] does the same job for a single category. Its category attribute is required and takes the category ID, name or slug. Use it when one category is all you need, because the intent is clearer to whoever edits the page after you. To show the categories themselves as a grid of tiles, use [product_categories]. It accepts parent=”0″ to show only top-level categories, or ids to show a hand-picked set.
Featured products and the older list shortcodes
To show featured products today, use [products] with the visibility attribute. This shows up to four products you marked as featured, two per row:
[products limit="4" columns="2" visibility="featured"]
You mark a product as featured with the star on the Products screen in your dashboard. If a product does not show, check that its catalog visibility is not set to Hidden.
Older tutorials use [featured_products], [sale_products], [best_selling_products], [recent_products], [top_rated_products] and [product_attribute]. WooCommerce’s documentation says [products] removes the need for all six. The old ones are still in the WooCommerce code, so a page that uses them keeps working. [featured_products], for example, still shows 12 featured products, newest first. For new pages, use the [products] versions:
- Featured products:
[products visibility="featured"] - Sale products:
[products on_sale="true"] - Best-selling products:
[products best_selling="true"] - Top-rated products:
[products top_rated="true"] - Newest products:
[products orderby="id" order="DESC"] - Products with an attribute:
[products attribute="season" terms="warm"]
A single product, and a bare add-to-cart button
[product_page id="99"] shows a complete product page inside any post or page, with images and the add-to-cart button. You can use sku instead of id. It is the right tool for a landing page built around one product, and our best single product WordPress themes roundup covers the theme side of that same build.
When you only want the button, [add_to_cart id="99"] gives you the price and the button without the rest of the product page. Add show_price="false" to hide the price. [add_to_cart_url id="99"] goes one step further and returns only the URL. Use it when you design the button yourself or link to the product from an email.
Related products and brands
[related_products] shows products that share tags or categories with the current product, so it belongs on a single product page. It takes limit, columns and orderby, where the order is random by default and you can switch it to price or title.
[related_products limit="4" columns="4" orderby="price"]
If you use the brands feature that now ships with WooCommerce, you also get brand shortcodes. The most useful one is [brand_products brand="your-brand-slug"], which shows a product grid for one brand and accepts the same grid attributes as [products].
Why a shortcode you copied has stopped working
Four causes explain almost every broken WooCommerce shortcode, and they are easy to tell apart.
- It came from an old tutorial: the snippet may use a misspelled name or a shortcode from a plugin you do not have. The older WooCommerce list shortcodes such as
[featured_products]still run, but[products]with an attribute is the version WooCommerce documents today - The attribute name changed:
limitandcolumnsare the current names, and older guides sometimes use attribute names that WooCommerce no longer accepts - Your store moved to the cart and checkout blocks: if the checkout page now holds a Checkout block, adding
[woocommerce_checkout]to a second page will not behave the way the tutorial expects - The shortcode is in the wrong kind of field: shortcodes run in post content, so one pasted into a widget, a theme option or a block that does not process shortcodes will simply print as text
When a shortcode prints as plain text on the front end, the last cause is almost always the answer. Move it into a Shortcode block in the post content and it will render. If it renders but shows no products, the problem is the query, not the shortcode. Check that the category slug is spelled correctly, that the products are published, and that their catalog visibility is not set to Hidden.
When a shortcode cannot do the job, a plugin usually can, and our guide to the best WooCommerce plugins covers the ones worth having.
FAQs about WooCommerce shortcodes
Shortcode questions come up all the time, especially now that blocks are part of the picture. Here are direct answers to the most common ones.
What are WooCommerce shortcodes?
WooCommerce shortcodes are short pieces of text in square brackets that show store content inside any post or page. [products] shows a product grid, [woocommerce_cart] shows the cart, and many of them accept attributes that control what appears.
What is the WooCommerce checkout shortcode?
The checkout shortcode is [woocommerce_checkout], and the cart shortcode is [woocommerce_cart]. On stores installed with WooCommerce 8.3 or later, the Checkout block and the Cart block replace them by default. The shortcodes still work if you add them to a page.
What is the shortcode for the WooCommerce my account page?
The my account shortcode is [woocommerce_my_account]. There is no block for this page, so the shortcode is the only way to build it. For order tracking, use [woocommerce_order_tracking], which also has no block.
Are WooCommerce shortcodes deprecated?
No. WooCommerce has not removed any of them. Only the cart and checkout shortcodes have block replacements. Four shortcodes, including the my account page and order tracking, have no block equivalent at all, so they are the only option. Existing shortcode pages keep working.
How do I add products to a page in WooCommerce?
Add a Shortcode block to the page and enter [products limit="8" columns="4"], then adjust the numbers to suit your layout. Add a category attribute to narrow it to one category, or visibility="featured" to show only featured products. If you prefer to set it up visually, use the Product Collection block.
What is the difference between WooCommerce blocks and shortcodes?
You set up blocks visually in the editor, and WooCommerce builds its newer cart and checkout work on them. You type shortcodes as text, so you can generate them with code or drop them into templates. For cart and checkout, the blocks are now the default. To put products inside a post, the shortcode is usually quicker.
Why has my WooCommerce shortcode stopped working?
The usual cause is a shortcode in a place that does not process shortcodes, such as a widget or a theme option field, so it prints as plain text. The other common causes are a misspelled name or an attribute name from an outdated tutorial. If it shows no products, check the slugs and the products’ catalog visibility.
Final thoughts on WooCommerce shortcodes
Shortcodes are not on the way out. Guides that say so take what happened to the cart and checkout and apply it to everything else. Four shortcodes have no block equivalent, the product shortcodes are still the fastest way to put products inside a post, and every one of them still runs.
Keep the decision rule somewhere you will see it again, because it settles most of these questions. Build new cart and checkout pages with the blocks. Leave working shortcode pages alone until you want what the blocks offer. Use [woocommerce_my_account] and [woocommerce_order_tracking] for those pages, and reach for [products] whenever you need store content where the shop templates do not go.
Which WooCommerce shortcode do you use most, and is there one you wish had a block version? Tell me in the comments below.