Avoid getting all webhook ids

This commit is contained in:
Mike Jolley 2019-02-18 13:19:12 +00:00
parent d0438264ff
commit 3a4ef0a1d8
1 changed files with 3 additions and 2 deletions

View File

@ -271,7 +271,8 @@ class WC_Admin_Webhooks {
// Get the webhooks count.
$data_store = WC_Data_Store::load( 'webhook' );
$count = count( $data_store->get_webhooks_ids() );
$num_webhooks = $data_store->get_count_webhooks_by_status();
$count = array_sum( $num_webhooks );
if ( 0 < $count ) {
$webhooks_table_list->process_bulk_action();