WooCommerce WordPress plugin comes with several shortcodes that can be used to insert content inside posts and pages. See here a list of the WooCommerce shortcodes.
WooCommerce is a widely used free e-commerce/store plugin for WordPress. It comes with various shortcodes that can be used to customize your online store such as the interface, checkout functionality, product listing etc. In this article, I made a complete list of all the WooCommerce shortcodes and their usage so new/advanced users can take full benefits from WooCommerce.
WooCommerce Shortcodes for Pages
When you first install WordPress it automatically creates 4 pages that are required to run your store – Shop, Cart, Checkout, and My Account. These pages have shortcodes that WooCommerce includes from its core. So if WooCommerce couldn’t create a page for some reason or you accidentally deleted it, you can recreate it with the proper shortcode and specify in the settings.
Shop page is your store page. It showcases all of your WooCommerce products and presents to your visitors. Currently, there is no shortcode to customize the content of this page. WooCommerce can automatically detect when the shop page is loading and list your products accordingly.
Please add the ‘[‘ and ‘]’ characters on before and after the WooCommerce shortcodes to make it work.
WooCommerce creates a Cart page for its shopping cart functionality. This is the cart shortcode:
The cart shortcode does not accept any additional parameter/argument. It shows the content of the shopping cart such as item details, coupon codes, shipping, taxes etc.
Check out page provides the checkout functionality for your customers. This is the WooCommerce shortcode for the checkout page:
The checkout shortcode does not accept any additional parameter/argument. It shows all the information which will be collected from a user during checkout such as billing info, shipping info, payment method etc.
My Account page shows a dashboard to the logged-in customers. This is the WooCommerce shortcode for the My Account page:
A customer can view their past orders, downloads, and update their personal details such as billing info, shipping info, account password from the My Account page.
Order Tracking Form
Order Tracking Form page is not created automatically by default. This is an optional page that you can manually create to let a customer check the status of an order. This is the WooCommerce shortcode for the Order Tracking Form page:
In order to see the status of an order, the customer needs to enter their order details in the Order Tracking Form.
More WooCommerce Shortcodes
There are some WooCommerce shortcodes which can be used anywhere you want.
You can use this WooCommerce shortcode to list a set of recent products.
recent_products per_page="12" columns="4"
You determine how many products to show on the page with the “per_page” attribute. The “columns” attribute can be used to control how many columns wide the products should be before wrapping.
You can use this WooCommerce shortcode to display products that have been set as “featured” in WooCommerce.
featured_products per_page="12" columns="4"
This WooCommerce shortcode allows you to show a single product by ID or SKU.