Automattic\WooCommerce\Internal\PushNotifications\Services
StepLogQuery::for_user
Returns every step recorded against every token one user owns.
Метод класса: StepLogQuery{}
Хуков нет.
Возвращает
array{rows: array, counts: array<string, int>, covered_from: int, next_to: int|null, logging: array}.
Использование
$StepLogQuery = new StepLogQuery(); $StepLogQuery->for_user( $user_id, $from, $to, $limit ): array;
- $user_id(int) (обязательный)
- The user.
- $from(int) (обязательный)
- Earliest timestamp, inclusive.
- $to(int) (обязательный)
- Latest timestamp, inclusive.
- $limit(int) (обязательный)
- Rows to return, newest first.
Список изменений
| С версии 11.3.0 | Введена. |
Код StepLogQuery::for_user() StepLogQuery::for user WC 11.3.0
public function for_user( int $user_id, int $from, int $to, int $limit ): array {
$token_ids = $this->data_store->get_token_ids_for_user( $user_id );
return $this->query(
self::get_token_sources(),
$from,
$to,
$limit,
fn( array $row ) => self::split_line_into_token_rows( $row, $token_ids )
);
}