Commit 216a91e5 authored by Erick Hitter's avatar Erick Hitter
Browse files

Don't break pagination by using the wrong number for total items

parent 1e354a2c
......@@ -194,7 +194,7 @@ class Events extends \WP_CLI_Command {
}
// Include totals for pagination etc
$total_items = \Automattic\WP\Cron_Control\count_events_by_status( \Automattic\WP\Cron_Control\Events_Store::STATUS_PENDING );
$total_items = \Automattic\WP\Cron_Control\count_events_by_status( $event_status );
$total_pages = ceil( $total_items / $limit );
return compact( 'status', 'limit', 'page', 'offset', 'items', 'total_items', 'total_pages' );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment