Quick Guide to WooCommerce Shortcodes

In the fast-paced world of e-commerce, if you are running an online store, it comes with its own set of challenges, and sometimes, you want to customize your online store without diving into complex coding. That’s where WooCommerce shortcodes come in.

WooCommerce shortcodes allow you to effortlessly add product displays, shopping carts, checkout forms, and various WooCommerce functionalities, ensuring that every aspect of your store looks professional and functions smoothly.

This tutorial will describe you about:

  • Understanding WooCommerce Shortcodes
  • What are the benefits of using shortcodes
  • How to add shortcodes in Page or Post.
  • Explore various shortcodes in WooCommerce

What are WooCommerce Shortcodes

WooCommerce shortcodes are like simple magic codes that are created especially for WooCommerce. It helps you add features to your online store without knowing any complicated coding. You can just put these shortcodes inside square brackets like this [shortcode] anywhere you want on your website, like a page or a blog post.

With these shortcodes, you can do all sorts of things, like showing off your products, displaying product categories so people can easily find what they’re looking for, setting up a shopping cart, a checkout page, and more. They can also help your customers manage their accounts or track their orders.

Why You Have to Use WooCommerce Shortcodes

Here are the benefits of using WooCommerce shortcodes in your online store.

  • Time-Saving: Instead of writing long lines of code or starting from scratch, you can use shortcodes to add WooCommerce functionality to your website. These shortcodes allow you to add features with just a single line of code or even less time.
  • Flexibility: Shortcodes allow you to place different WooCommerce elements anywhere on your site, not just where the default settings put them. It gives you more control over the layout and design.
  • Improve User Experience: Using shortcodes in your store can add helpful features like search options and filters to enhance the customer experience. These features make it easier for customers to find what they’re looking for by narrowing down their search or applying specific criteria.
  • Enhanced Functionality: Shortcodes allow you to add special features and functions, like product listings or order tracking, directly into your website pages or blog posts. This enhanced functionality makes it easier for your customers to browse and track their orders without navigating to separate pages or sections.
  • Easy to Use: Shortcodes provide a simple way to integrate WooCommerce features into your website without requiring advanced coding knowledge. You can effortlessly add functionalities like product displays, shopping carts, and checkout processes wherever you need them.

How to add WooCommerce Shortcodes

Once you understand WooCommerce shortcodes well, you can easily add them to your website pages or blog posts. Adding shortcodes in WooCommerce is a straightforward process that allows you to enhance the functionality and appearance of your online store. Here’s a step-by-step guide on how to add shortcodes in both Gutenberg and Classic editors:

Gutenberg Editor

  • To add the shortcode in the Gutenberg editor, go to the page or post where you want to add the shortcode.
  • Then, search for the shortcode block by typing “/shortcode.” Once you find it, click on it to add it to your page or post.
Search For Shortcode Block in Gutenberg Editor
Search For Shortcode Block in Gutenberg Editor
  • Now, paste or type your WooCommerce shortcode into the block.
  • Finally, click the update button to save your page or post with the shortcode added.
Adding WooCommerce Shortcodes in Gutenberg Editor
Adding Shortcode in Gutenberg Editor

Classic Editor

Adding shortcodes in the Classic Editor is easy. First, go to the post or page where you want to use the shortcode. Then, simply paste the shortcode wrapped in the square brackets.

Adding Shortcode in Classic Editor
Adding Shortcode in Classic Editor

Lists of WooCommerce Shortcodes You Can Use

We’ve discussed the concept of WooCommerce shortcodes, and now it’s time to implement them. Below are some powerful shortcodes WooCommerce provides that can significantly improve your store’s functionality and appearance.

Display All Products

Before using this shortcode on your page, ensure you have already added the products to your WooCommerce store.


This shortcode helps you display all your products in a grid layout in your online store. It’s beneficial because it gives your customers a complete look at everything you’re selling.

Adding Products Shortcode to Display All Products
Adding Products Shortcode to Display All Products

WooCommerce Shopping Cart


When you install & activate WooCommerce on your WordPress site, it automatically makes a default cart page for you using the [woocommerce_cart] shortcode. This shortcode brings the shopping cart feature from WooCommerce to your webpage. It shows all the products a user has added to their cart. You can add this shortcode anywhere on your website.

It’s helpful if you want to make a custom checkout or let customers quickly see what’s in their cart from any page. Once you use this shortcode, it’ll show what’s in the cart, like images of the products, their names, how much they cost, how many of each item, and the total cost of products in the cart.

Display Shopping Cart Using WooCommerce Shortcode
Display Shopping Cart Using WooCommerce Shortcode

WooCommerce Checkout


Similar to the cart page, WooCommerce automatically creates a checkout page by default by including the [woocommerce_checkout] shortcode. This shortcode lets you bring the Checkout page to any page on your website. It is handy if you’re creating your custom checkout experience.

When you use this shortcode, it shows the Checkout page. It is essential for your business, so you must ensure it’s set up just right. After all, if a customer can’t find the checkout, they can’t buy anything.

With this shortcode, your customers will see the whole Checkout page, including forms for billing and shipping details, a review of their order, and the button to place their order.

Display Checkout Page Using WooCommerce Shortcode
Display Checkout Page Using WooCommerce Shortcode

WooCommerce My Account Page


If you want to include the My Account page from your WooCommerce store on any website page, you can use a shortcode. By default, WooCommerce makes this page and includes the [woocommerce_my_account] shortcode that will show the entire My Account page without you having to do any coding. It’s like a shortcut to quickly add the My Account section wherever you want on your site.

Display My Account Page Using WooCommerce Shortcode
Display My Account Page Using WooCommerce Shortcode

WooCommerce keeps up with the ever-growing world of online shopping by introducing WooCommerce blocks. These blocks are like building blocks that you can use to add different features to your website. If you find shortcodes a bit tricky, you can use these blocks instead. They make it easy to add features like product displays, checkout processes, and more without needing to know any code. Check out our detailed article to learn more about WooCommerce blocks!

Add to Cart Button in WooCommerce

[add_to_cart id="64"]

This shortcode shows the price of a particular product and an add to cart button. You must add which product to display by providing its unique product ID under the “id=” section. You can replace 64 with your product ID.

You can find the product ID by going to Products ➝ All Products and hovering over the product you want the ID for. It’s a simple way to display a specific product’s price and add it to your cart with just a shortcode.

The screenshot below shows the product price and an “Add to Cart” button. I added the product image separately; it is not included with the shortcode.

Display Add to Cart with Product Price Using WooCommerce Shortcode
Display Add to Cart with Product Price Using WooCommerce Shortcode

WooCommerce Order Tracking


The WooCommerce order tracking shortcode lets you add a tracking form on any website page. Even though this page isn’t automatically included in WooCommerce, you can easily make a new page and add the shortcode to make your own. It’s useful when you enable the guest checkout in your WooCommerce store.

This shortcode displays an order tracking form where customers can type in their order ID and the email they used for billing.

Display Order Tracking Form Using WooCommerce Shortcode
Display Order Tracking Form Using WooCommerce Shortcode

Get Started With WooCommerce Shortcodes

WooCommerce shortcodes make your online store more functional and user-friendly. They let you show product details, enable quick checkouts, and add order tracking on any page. This makes shopping easier for customers, leading to more sales and happier customers.

Leave a Reply

Your email address will not be published. Required fields are marked *