WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Платформа для конвертации и монетизации трафика
функция не описана

ActionScheduler_HybridStore::action_counts() public WC 1.0

Get a count of all actions in the store, grouped by status

{} Это метод класса: ActionScheduler_HybridStore{}

Хуков нет.

Возвращает

Массив. Set of 'status' => int $count pairs for statuses with 1 or more actions of that status.

Использование

$ActionScheduler_HybridStore = new ActionScheduler_HybridStore();
$ActionScheduler_HybridStore->action_counts();

Код ActionScheduler_HybridStore::action_counts() WC 4.7.1

<?php
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;
}