Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon Woocommerce shortcodes list


Woocommerce shortcodes list


WooCommerce provides a variety of shortcodes that allow users to easily add dynamic content and functionalities to their WordPress sites. Below is a list of the most commonly used WooCommerce shortcodes along with their descriptions:

General WooCommerce Shortcodes

- [woocommerce_cart]: Displays the cart page.

- [woocommerce_checkout]: Displays the checkout page.

- [woocommerce_my_account]: Shows the user account page.

- [woocommerce_order_tracking]: Displays an order tracking form for customers.

- [product_page id="99"]: Displays a full single product page for a product with a specific ID or SKU.

- [products]: Displays products based on specific parameters such as category or attributes. This shortcode is very versatile and allows for extensive customization.

- [product_category category="category-slug"]: Displays products in a specified category.

- [product_categories]: Displays a list of product categories.

- [add_to_cart id="99"]: Shows an "Add to Cart" button for a specific product.

- [add_to_cart_url id="99"]: Retrieves the URL for adding a specific product to the cart.

- [shop_messages]: Displays WooCommerce messages on non-WooCommerce posts or pages.

Product Filtering Shortcodes

- [woocommerce_product_search]: Displays a live product search field that shows results as the user types.

- [woocommerce_product_filter]: Shows a live product search filter.

- [woocommerce_product_filter_attribute]: Displays a filter based on product attributes.

- [woocommerce_product_filter_category]: Displays a filter for product categories.

- [woocommerce_product_filter_price]: Provides a price range filter.

- [woocommerce_product_filter_tag]: Displays a filter based on product tags.

- [woocommerce_product_filter_rating]: Shows a filter for product ratings.

- [woocommerce_product_filter_sale]: Filters products that are on sale.

- [woocommerce_product_filter_stock]: Filters products based on availability.

- [woocommerce_product_filter_reset]: Provides a button to clear all applied filters.

These shortcodes can be used in both the classic and block editors of WordPress, allowing for flexible integration of WooCommerce functionalities into various parts of a website[1][2][4][5].

Citations:
[1] https://woocommerce.com/document/woocommerce-shortcodes/
[2] https://diviflash.com/woocommerce-shortcodes/
[3] https://woocommerce.com/document/woocommerce-shortcodes/products/
[4] https://barn2.com/blog/woocommerce-shortcodes/
[5] https://woocommerce.com/document/woocommerce-product-search/shortcodes/