CollectionItems
Trait to fetch items from an ItemPriceCollection
Table of Contents
Methods
| getItems() | Retrieves a list of all item prices in the collection |
Methods
getItems()
Retrieves a list of all item prices in the collection
protected
getItems(ItemPriceCollection $collection) : array<string|int, mixed>
Parameters
- $collection : ItemPriceCollection
-
The collection from which to fetch all items
Return values
array<string|int, mixed> —An array of stdClass objects representing each item, including:
- description The item description
- price The item unit price
- qty The item quantity
- subtotal The item subtotal
- total The item total
- total_after_tax The item total including tax
- total_after_discount The item total after discount
- tax_amount The total item tax
- discount_amount The total item discount