Skip to content

StatInterface ​

Type
Interface
Namespace
craft\commerce\base
Implemented by
craft\commerce\base\Stat, craft\commerce\stats\AverageOrderTotal, craft\commerce\stats\NewCustomers, craft\commerce\stats\RepeatCustomers, craft\commerce\stats\TopCustomers, craft\commerce\stats\TopProductTypes, craft\commerce\stats\TopProducts, craft\commerce\stats\TopPurchasables, craft\commerce\stats\TotalOrders, craft\commerce\stats\TotalOrdersByCountry, craft\commerce\stats\TotalRevenue
Since
3.0

Stat Interface

View source

Public Methods ​

MethodDescription
get()
getData()
getDateRangeWording()
getEndDate()
getHandle()
getOrderStatuses()
getStartDate()
prepareData()
setEndDate()
setOrderStatuses()Set order statuses to limit stat query. Accepts array of OrderStatus models, handle strings or uid strings.
setStartDate()

get() ​

View source

Returns ​

mixed

getData() ​

View source

Returns ​

mixed

getDateRangeWording() ​

View source

getEndDate() ​

View source

Returns ​

mixed

getHandle() ​

View source

getOrderStatuses() ​

Since
4.2.0

View source

Returns ​

array, null

getStartDate() ​

View source

Returns ​

mixed

prepareData() ​

View source

Arguments ​

  • $data (mixed)

Returns ​

mixed

setEndDate() ​

View source

Arguments ​

  • $date

setOrderStatuses() ​

Since
4.2.0

Set order statuses to limit stat query. Accepts array of OrderStatus models, handle strings or uid strings.

View source

Arguments ​

Returns ​

void

setStartDate() ​

View source

Arguments ​

  • $date