Product variation loop
Field loops do not query to the DB, they receive a prepopulated items
field.
This Loop is returned by a product's variations
field, it cannot be called directly in a template (can be manually constructed through code, though).
For loop type woo_product_variation
, here are the available query arguments and fields.
Query arguments
Fields
-
attributes
- Array of variation attributes such as size, color. Returns a Loop
-
backorders_allowed
- Backorders allowed
-
dimensions_html
- Dimensions html
-
display_price
- Display price
-
display_regular_price
- Regular price
-
image
- Variation image
-
is_downloadable
- Is downloadable
-
is_purchasable
- Is purchasable
-
is_sold_individually
- Is sold individually
-
is_virtual
- Is virtual
-
max_qty
- Max qty
-
min_qty
- Min qty
-
price_html
- Price html
-
sku
- SKU
-
variation_description
- Variation description
-
variation_id
- Variation ID
-
variation_is_active
- Variation is active
-
variation_is_visible
- Variation is visible
-
weight
- Weight
-
weight_html
- Weight html