Skip to main content
Woo - Dynamic Shortcodes

Explore the Woo Dynamic Shortcode, offering advanced functionality for retrieving and customizing WooCommerce data.

Updated over a week ago

The WooCommerce Dynamic Shortcode is a versatile tool designed for WordPress, enabling users to dynamically display WooCommerce product information.

Syntax

{woo:field}
  • field: the product information you want to display

Key Arguments

  • id: Specifies the WooCommerce product ID.

    {woo:field @ID=23}

Examples

  1. Basic Product Price Display

    {woo:price}

    Displays the price of current product.

  2. Product Name

    {woo:title}

  3. Product Attributes and Description

    {woo:attributes@id=20} 

    Retrieves and displays the attributes of the product with ID 20.

  4. Sale Price with Fallback

    {woo:sale-price@id=25?'No sale price'} 

    Shows the sale price of product ID 25; displays "No sale price" if none exists.

Special Privileges

The Woo Dynamic Shortcode requires special privileges in certain scenarios:

  • Access to Non-Public Products: To read meta data from non-public products, the shortcode must be used within a Power Shortcode.

Did this answer your question?