You appear to be a bot. Output may be restricted
Description
Get a count of all actions in the store, grouped by status
Usage
$array = ActionScheduler_HybridStore::action_counts();
Parameters
Returns
array Set of 'status' => int $count pairs for statuses with 1 or more actions of that status.
Source
File name: woocommerce/packages/action-scheduler/classes/data-stores/ActionScheduler_HybridStore.php
Lines:
1 to 25 of 25
public function action_counts() { $unmigrated_actions_count = $this->secondary_store->action_counts(); $migrated_actions_count = $this->primary_store->action_counts(); $actions_count_by_status = array(); foreach ( $this->get_status_labels() as $status_key => $status_label ) { $count = 0; if ( isset( $unmigrated_actions_count[ $status_key ] ) ) { $count += $unmigrated_actions_count[ $status_key ]; } if ( isset( $migrated_actions_count[ $status_key ] ) ) { $count += $migrated_actions_count[ $status_key ]; } $actions_count_by_status[ $status_key ] = $count; } $actions_count_by_status = array_filter( $actions_count_by_status ); return $actions_count_by_status; }