Fixed webhook pagination results

This commit is contained in:
Claudio Sanches 2017-11-28 15:27:31 -02:00
parent 625f50a5bf
commit 88e4d021ab
1 changed files with 5 additions and 1 deletions

View File

@ -274,7 +274,11 @@ class WC_Admin_Webhooks_Table_List extends WP_List_Table {
$data_store = WC_Data_Store::load( 'webhook' ); $data_store = WC_Data_Store::load( 'webhook' );
$webhooks = $data_store->search_webhooks( $args ); $webhooks = $data_store->search_webhooks( $args );
$this->items = array_map( 'wc_get_webhook', $webhooks ); $this->items = array_map( 'wc_get_webhook', $webhooks );
$total_items = count( $data_store->get_webhooks_ids() );
// Get total items.
$args['limit'] = -1;
$args['offset'] = 0;
$total_items = count( $data_store->search_webhooks( $args ) );
// Set the pagination. // Set the pagination.
$this->set_pagination_args( array( $this->set_pagination_args( array(