WooCommerce shortcodes are short codes in square brackets, such as [products limit="4"], that place store content on any WordPress page. WooCommerce 11.1.2 registers 19 of them, plus one old alias, and you can paste any of them into a Shortcode block.
We did not copy that number from another list. We read it from the WooCommerce 11.1.2 source code and then tested the shortcodes on a fresh WooCommerce 11.1.2 test store. That test also showed something most shortcode lists miss: a new store now builds its Cart and Checkout pages with blocks.
You get the full list first. Then comes what changed for the cart, checkout and account pages. After that come every [products] attribute with its default, real examples, how to add a shortcode, and fixes for when one does not work.
What Are WooCommerce Shortcodes?
WooCommerce shortcodes are tags in square brackets that WordPress swaps for store content when a page loads. The [products] tag becomes a product grid, while [woocommerce_my_account] becomes the account area. Attributes inside the brackets, such as limit="4", change what each one shows.
New to the idea? Our WordPress shortcode guide explains tags, attributes and where each one runs.

Shortcodes came before the block editor, and they still work everywhere: in pages, posts, widgets and theme files. That is why they remain the fastest way to drop a product grid into a landing page or a sidebar. One line of text can move between a staging site and a live site without any export.
WordPress runs shortcodes when it prints post content. A shortcode works anywhere content is shown. A shortcode WooCommerce registers behaves exactly like one from any other plugin. That is why the same fixes apply to both.
A shortcode has three parts. The tag names what to show, the attributes change it, and the square brackets tell WordPress to process it. So in [products category="bags" columns="3"], products is the tag and category and columns are attributes.
The Complete WooCommerce Shortcode List (Verified in 11.1.2)
WooCommerce 11.1.2 registers 19 shortcodes and one alias, [woocommerce_messages], in three groups. Page shortcodes cover the cart, checkout and account, product shortcodes build grids, and action shortcodes add buttons and notices. Lists that show 24 or more include shortcodes that no longer exist.
We took this WooCommerce shortcodes list from the init() function in the WooCommerce 11.1.2 shortcodes class on the official plugin repository. Every shortcode below is registered there, and nothing else is.
| Shortcode | Group | What it shows |
|---|---|---|
[woocommerce_cart] | Page | The classic cart |
[woocommerce_checkout] | Page | The classic checkout form |
[woocommerce_my_account] | Page | The customer account area and login form |
[woocommerce_order_tracking] | Page | A form to look up an order by ID and email |
[products] | Product | A product grid filtered by attributes |
[product] | Product | One product in grid style |
[product_page] | Product | A full single product page |
[product_category] | Product | Products from one category |
[product_categories] | Product | A grid of product categories |
[recent_products] | Product | Newest products first |
[sale_products] | Product | Products on sale |
[best_selling_products] | Product | Best sellers by sales count |
[top_rated_products] | Product | Highest rated products |
[featured_products] | Product | Products marked as featured |
[product_attribute] | Product | Products with an attribute value |
[related_products] | Product | Products related to the current one |
[add_to_cart] | Action | An add to cart button with price |
[add_to_cart_url] | Action | The add to cart URL as plain text |
[shop_messages] | Action | WooCommerce notices outside WooCommerce pages |
[woocommerce_messages] | Alias | The same as [shop_messages] and kept for sites older than WooCommerce 2.1 |
Some older guides list [view_cart], [upsell_products] or [cross_sell_products]. None of those is registered in 11.1.2. Pasting one prints the bracket text on the page instead of content.

Product Categories Shortcode Attributes
The [product_categories] shortcode has its own seven attributes, read from the same 11.1.2 file. It shows category tiles rather than products. Its options are about which categories appear:
| Attribute | Default | What it does |
|---|---|---|
limit | -1 (all) | How many categories to show |
orderby | name | Sort field for the categories |
order | ASC | Sort direction |
columns | 4 | Categories per row |
hide_empty | 1 | Hides categories with no products |
parent | Empty | Shows children of one category, or top level with parent="0" |
ids | Empty | Category IDs separated by commas |
Set parent="0" on a shop landing page to show only the top level categories. Without it, subcategories appear next to their parents and the grid gets crowded.
The WooCommerce Product Shortcode for Buttons
The [add_to_cart] shortcode takes six attributes: id, sku, quantity, class, show_price and style. The style default in 11.1.2 is border:4px solid #ccc; padding: 12px;, which explains the gray box that surrounds the button on most themes.
To remove that box, pass an empty style: [add_to_cart id="123" style=""]. Use show_price="false" when the price already sits in the text around the button.
Most of the product shortcodes are shortcuts for [products] with one attribute set. For example, [sale_products] gives the same result as [products on_sale="true"]. The 11.1.2 source checks three such switches before anything else: on_sale, best_selling and top_rated.
So once you know the [products] attributes below, you know almost all of the product shortcodes. The named versions such as [best_selling_products] are easier to read on a page, while the switch form keeps every grid on one shortcode you already know.
Cart, Checkout and My Account Shortcodes in 2026
A new WooCommerce store in 2026 builds its Cart and Checkout pages with blocks instead of the WooCommerce cart shortcode or checkout shortcode. We confirmed this on a fresh install of WooCommerce 11.1.2 on WordPress 7.1.2. The My Account page was the one exception, since it still used the WooCommerce my account shortcode.
Here is what the three pages WooCommerce created contained, read from the page content on our WooCommerce 11.1.2 test store:
| Page | Content WooCommerce created |
|---|---|
| Cart | The woocommerce/cart block |
| Checkout | The woocommerce/checkout block |
| My account | [woocommerce_my_account] inside a Shortcode block |
WooCommerce’s own shortcodes documentation says the platform has “moved to block-based store editing.” It also says you can still “use legacy shortcodes inside a shortcode block,” so the classic versions keep working.
When to Use the WooCommerce Checkout Shortcode
Use [woocommerce_checkout] when a plugin you rely on does not support the Checkout block yet. Some older payment gateways and checkout field plugins only hook into the classic form. If yours is one, replace the Checkout block with a Shortcode block holding [woocommerce_checkout]. Then run a test order.
The same goes for [woocommerce_cart]. The Cart block handles most stores well, but a plugin that adds fields or notices to the classic cart may need the shortcode version.
On that shortcode cart you can add a custom cart page button with hooks using one small snippet.
Worth knowing: The cart and checkout shortcodes take no attributes at all. In the 11.1.2 source, the cart shortcode passes an empty list of allowed attributes. Tips like [woocommerce_cart show_coupon="false"] do nothing.
The account shortcode has one attribute left, order_count, and the source marks it deprecated since WooCommerce 2.6.0. Control what the account area shows through WooCommerce > Settings > Advanced instead.
The Order Tracking Shortcode
The [woocommerce_order_tracking] shortcode shows a form where a customer types their order ID and billing email to see its status. It takes no attributes.
Put it on a page called “Track your order” and link it from your order emails. It saves a support email for every “where is my order” question. For carrier links and tracking numbers on that page, compare order tracking plugins for WooCommerce.
How to Add a WooCommerce Shortcode to Your Site
To add a WooCommerce shortcode, insert a Shortcode block in the block editor and paste the code into it. In the classic editor, paste the code straight into the content area. In widget areas, use a Shortcode block or a text widget, and the shortcode runs the same way.
Using the Block Editor
Open the page or post, click the block inserter, search for “Shortcode” and add the block. Paste your shortcode, such as [products limit="4" columns="4"]. Then update the page.



A Shortcode block is better than a Paragraph block for this. It keeps the code apart from your text. The editor does not wrap it in formatting that can break it.
Using the Classic Editor
In the classic editor, open the page, switch to the Text tab, and paste the shortcode on its own line. The Text tab stops the visual editor from adding stray formatting around it.



Adding Shortcodes to Widgets and Sidebars
Go to Appearance > Widgets, add a Shortcode block to the sidebar or footer, and paste the code. A small [products limit="3" columns="1" orderby="popularity"] grid works well in a narrow sidebar.

Every Products Shortcode Attribute
The [products] shortcode takes 19 attributes in WooCommerce 11.1.2, covering how many products to show, which ones and in what order. Only three have non-empty defaults: limit is -1, meaning all, and the category, tag and term operators default to IN. Everything else is off until you set it.
We read these from the parse_attributes() function of the [products] shortcode class in 11.1.2:
| Attribute | Default | What it does |
|---|---|---|
limit | -1 (all) | How many products to show |
columns | Your store’s products-per-row setting | Products per row |
rows | Empty | Number of rows. When set, it overrides limit |
orderby | Empty | menu_order, title, date, rand, price, popularity, rating or id |
order | Empty | ASC or DESC |
ids | Empty | Product IDs separated by commas |
skus | Empty | Product SKUs separated by commas |
category | Empty | Category slugs or IDs |
cat_operator | IN | IN, NOT IN or AND |
attribute | Empty | One attribute slug |
terms | Empty | Attribute term slugs or IDs |
terms_operator | IN | IN, NOT IN or AND |
tag | Empty | Tag slugs |
tag_operator | IN | IN, NOT IN or AND |
visibility | visible | visible, catalog, search or hidden |
class | Empty | A CSS class for the wrapper |
page | 1 | Which page to show |
paginate | false | Adds page links when true |
cache | true | Caches the result |
The rows attribute catches people out. If you set rows="2" with columns="3", the grid shows six products no matter what limit says.

What Our Test Store Showed
We added six products to a fresh WooCommerce 11.1.2 test store and placed three shortcodes on one page. The first sorted by price, highest first, with limit="4" and columns="2".
It returned Travel Backpack at $89, Leather Wallet on sale at $39, Laptop Sleeve at $35 and Canvas Tote Bag at $24.
The category shortcode for bags had no orderby set, and the three bags came back in alphabetical order by title. The sale shortcode returned only the Leather Wallet, the one product with a sale price.
So with no orderby, do not count on newest first. If the order matters, set orderby and order every time.
Real World Ways to Use WooCommerce Shortcodes
The most useful WooCommerce shortcodes on a real store are product grids on landing pages and a featured strip on the home page. Add to cart buttons inside blog posts come next, and each one takes a single line. Here are copy-ready versions for common jobs:
- Landing page for one category:
[products category="bags" limit="8" columns="4" orderby="popularity"] - Home page featured strip:
[featured_products limit="4" columns="4"] - Sale page:
[sale_products limit="12" columns="4" paginate="true"] - Buy button in a blog post:
[add_to_cart id="123" show_price="true"] - Hand-picked bundle:
[products ids="12,34,56" columns="3"]
Each of these can live in a synced pattern. That way the same grid appears on several pages. Edit the pattern once and every page updates. That is handy for a seasonal sale strip you swap every few weeks.
The buy button is the one most stores never use. A review post about a product can end with a real add to cart button instead of a “shop now” link. That saves the reader a click and a page load.
If you run a loyalty program, a points balance or a rewards grid can sit next to these on the same page. Our roundup of best WooCommerce rewards plugins covers plugins that add their own shortcodes for exactly that.
WooCommerce Shortcodes vs. Blocks: Which Should You Use?
Use WooCommerce blocks for new pages you build in the block editor, and shortcodes when you need content in places blocks cannot reach. Blocks show a live preview and have more settings. Shortcodes work in widgets, theme files and older page builders, and they suit copying between sites.
| Shortcodes | Blocks | |
|---|---|---|
| Live preview in the editor | No | Yes |
| Works in theme PHP files | Yes, with do_shortcode() | No |
| Works in classic widgets and page builders | Yes | Only in block areas |
| Default for new Cart and Checkout pages | No | Yes, in 11.1.2 |
| Easy to copy between sites | Yes, one line of text | Yes, as block markup |
Mixing both is fine. A block-based page can hold a Shortcode block for a grid, and a classic page can use shortcodes throughout.
Block themes change the balance a little. In a block theme, the shop, product and archive templates are edited in the Site Editor with WooCommerce blocks. Shortcodes mostly live inside pages. In a classic theme, shortcodes are still the main way to put store content on custom pages.
One practical rule helps: if a client will edit the page, use blocks, because they can see what they are changing. If a developer maintains it, a shortcode is often simpler to copy between staging and live.
How to Create a Custom WooCommerce Shortcode
You can create a custom WooCommerce shortcode with the WordPress add_shortcode() function in a child theme or a small plugin. The function names your tag and points to a callback that returns HTML. WordPress then swaps the tag for that HTML wherever you use it.

This example adds [dd_free_shipping_note], which prints a line about free shipping above a set amount:
add_shortcode( 'dd_free_shipping_note', function ( $atts ) {
$atts = shortcode_atts( array( 'amount' => '50' ), $atts, 'dd_free_shipping_note' );
return '<p class="dd-shipping-note">' . esc_html( sprintf( 'Free shipping on orders over $%s.', $atts['amount'] ) ) . '</p>';
} );
The add_shortcode() reference explains the rule that trips people up: the callback must return its output. If it prints with echo, the text jumps to the top of the page. Printed output lands at the top of the page instead of where the shortcode sits.
Put the code in a child theme’s functions.php or, better, in a small custom plugin. A plugin keeps the shortcode working if you ever change themes, while a theme function stops working the day the theme is switched off.
The shortcode_atts() call sets the default and ignores any attribute you did not list, which keeps the output predictable. The esc_html() call makes sure an attribute value cannot inject HTML into the page.
Use [dd_free_shipping_note amount="75"] on any page to change the threshold. If you are building more than a snippet, our guide on how to create a WooCommerce plugin covers the plugin structure it belongs in.
WooCommerce Shortcodes Not Working? Here’s How to Fix It
A WooCommerce shortcode that shows as plain text is either misspelled, unregistered or wrapped in formatting that breaks it. A shortcode that runs but shows nothing usually has an attribute that matches no products. These checks cover almost every case.
Check 1: Curly Quotes Instead of Straight Quotes
Pasting from a document or chat often turns " into curly quotes. WordPress does not read curly quotes as attribute quotes. So limit=“4” is ignored. Retype the quotes in the editor or paste into a Shortcode block that keeps them straight.
Check 2: The Shortcode Is Wrapped in Code Formatting
If the shortcode sits inside a <pre> or <code> tag, WordPress shows it as text on purpose. Move it into its own Shortcode block, outside any code or preformatted block.
Check 3: A Misspelled or Removed Shortcode
Check the tag against the list above. [view_cart] and [upsell_products] were never registered in 11.1.2, and a typo like [product_categorys] fails the same way. The page prints the brackets when WordPress finds no matching tag.
Check 4: A Plugin or Theme Conflict
Switch to a default theme on a staging copy and test again. Then deactivate plugins one at a time. A page builder or caching plugin that processes content early is the usual cause.
Check 5: Attributes That Match No Products
“No products were found” means the shortcode ran but the query came back empty. Check the category slug, since category="Bags" and category="bags" are not always the same, and confirm the products are published and visible in the catalog.
For stores where product grids also need to rank, our WooCommerce SEO guide covers how to make category and landing pages worth indexing.
Conclusion
WooCommerce shortcodes still work in 2026, and WooCommerce 11.1.2 registers 19 of them plus one alias. The [products] shortcode does most of the work, with 19 attributes that control count, filters and order.
The big change is the cart and checkout. New stores get blocks there. The shortcode versions take no attributes. Keep [woocommerce_checkout] for plugins that need the classic form. For everything else, a Shortcode block and one line of code is still the quickest way to put products on a page.
Frequently Asked Questions (FAQs)
Q1. Are WooCommerce shortcodes being deprecated?
No. WooCommerce 11.1.2 still registers all 19, and its documentation says you can use them inside a Shortcode block. New Cart and Checkout pages use blocks by default, but the shortcode versions keep working when you add them.
Q2. What is the WooCommerce shop page shortcode?
There is no shop page shortcode. The shop page is a WooCommerce archive set under WooCommerce > Settings > Products. To show a shop style grid on another page, use [products limit="12" columns="4" paginate="true"].
Q3. Can I use multiple WooCommerce shortcodes on one page?
Yes. Our test page ran three product shortcodes one after another with no problem. Avoid two cart or two checkout shortcodes on one page, since each expects to be the only one.
Q4. Do WooCommerce shortcodes slow down my site?
Not noticeably for small grids, and the [products] shortcode caches its results by default through its cache attribute. Very large grids with limit="-1" on big catalogs can be slow. Set a limit and use pagination.
Q5. How do I show products by SKU with a shortcode?
Use [products skus="SKU1,SKU2"] with the SKUs exactly as they appear in the product data. Check for spaces or a different case in the SKU when a product does not show.
Q6. Can I use a WooCommerce shortcode in a PHP template?
Yes. Wrap it in do_shortcode(), for example echo do_shortcode( '[products limit="4"]' );, inside a child theme template. Use it sparingly, since a template change is harder for other people to find than a shortcode on a page.
