Order item loop

Field loops do not query to the DB, they receive a prepopulated items field.

This Loop is returned by an order's items field, it cannot be called directly in a template (can be manually constructed through code, though).

For loop type woo_order_item, here are the available query arguments and fields.

Query arguments

Fields

  • item_download_url - Get the Download URL
  • item_downloads - Get any associated downloadable files
  • product - Get product. Returns a Loop.
  • product_id - Corresponding product id
  • quantity - Get quantity
  • subtotal - Get subtotal
  • subtotal_tax - Get subtotal tax
  • tax_class - Get tax class
  • tax_status - Get tax status
  • total - Get total
  • total_tax - Get total tax
  • unit_price - Price per unit
  • variation_id - Get variation ID