Tribe__Events__Aggregator__Service::get_usage( string $type, boolean $ignore_cache = false )
Returns limit usage
Contents
Parameters
- $type
-
(string) (Required) Type of usage to return
- $ignore_cache
-
(boolean) (Optional) Whether or not cache should be ignored when fetching the value
Default value: false
Return
(array)
Source
File: src/Tribe/Aggregator/Service.php
public function get_usage( $type, $ignore_cache = false ) {
static $origins;
if ( ! $origins || $ignore_cache ) {
$origins = (object) $this->get_origins();
}
if ( ! isset( $origins->usage->$type ) ) {
return array(
'used' => 0,
'remaining' => 0,
);
}
return $origins->usage->$type;
}