On this page, you’ll find a few common issues for why WooCommerce shortcodes might not work as expected.
Shortcodes Cannot be Embedded between <pre> tags
If you correctly pasted your shortcodes and the display looks incorrect, make sure you did not embed the shortcode between <pre> tags. This is a common issue. To remove these tags, edit the page, and click the Text tab:
Another common problem is that straight quotation marks ("
) are displayed as curly quotation marks (“
). For the shortcodes to work correctly, you need straight quotation marks.
Variation Product SKU Not Shown
↑ Back to topIn regards to the use of SKU shortcode like [products skus="sku-name"]
, the variation product SKU isn’t intended to be displayed by itself, as opposed to the parent variable product SKU. Therefore, if you use an SKU from Product data > Variable product > Variations > Variation name > SKU, it does not display.
However, if we use an SKU from the parent variable product: Product data > Variable product > Inventory > SKU, it displays.
Code Snippets
↑ Back to topNote: We are unable to provide support for customizations under our Support Policy. If you need to customize a snippet, or extend its functionality, seek assistance from a qualified WordPress/WooCommerce Developer. We highly recommend Codeable, or a Certified WooExpert.
Top-level Product Category List
↑ Back to topThe Product Categories List block can, as the name suggests, display a list of product categories. However, it doesn’t currently (April 2023) have the option to display only top-level categories and will display all categories, top-level and sub-categories alike.
This snippet adds a new shortcode [top_level_product_categories_list]
that outputs a bulleted list of top-level product categories only. Add it to a child theme’s functions.php file or via a code snippets plugin.
Questions and support
↑ Back to topDo you still have questions and need assistance?
This documentation is about the free, core WooCommerce plugin, for which support is provided in our community forums on WordPress.org. By searching this forum, you’ll often find that your question has been asked and answered before.
If you haven’t created a WordPress.org account to use the forums, here’s how.
- If you’re looking to extend the core functionality shown here, we recommend reviewing available extensions in the WooCommerce Marketplace.
- Need ongoing advanced support or a customization built for WooCommerce? Hire a Woo Agency Partner.
- Are you a developer building your own WooCommerce integration or extension? Check our Developer Resources.
If you weren’t able to find the information you need, please use the feedback thumbs below to let us know.