ActionScheduler_Store::extra_action_counts
Get additional action counts.
- add past-due actions
Method of the class: ActionScheduler_Store{}
Hooks from the method
Returns
Array.
Usage
$ActionScheduler_Store = new ActionScheduler_Store(); $ActionScheduler_Store->extra_action_counts();
ActionScheduler_Store::extra_action_counts() ActionScheduler Store::extra action counts code WC 10.6.2
public function extra_action_counts() {
$extra_actions = array();
$pastdue_action_counts = (int) $this->query_actions(
array(
'status' => self::STATUS_PENDING,
'date' => as_get_datetime_object(),
),
'count'
);
if ( $pastdue_action_counts ) {
$extra_actions['past-due'] = $pastdue_action_counts;
}
/**
* Allows 3rd party code to add extra action counts (used in filters in the list table).
*
* @since 3.5.0
* @param $extra_actions array Array with format action_count_identifier => action count.
*/
return apply_filters( 'action_scheduler_extra_action_counts', $extra_actions );
}