Avoid getting all webhook ids
This commit is contained in:
parent
d0438264ff
commit
3a4ef0a1d8
|
@ -270,8 +270,9 @@ class WC_Admin_Webhooks {
|
|||
echo '<h2>' . esc_html__( 'Webhooks', 'woocommerce' ) . ' <a href="' . esc_url( admin_url( 'admin.php?page=wc-settings&tab=advanced§ion=webhooks&edit-webhook=0' ) ) . '" class="add-new-h2">' . esc_html__( 'Add webhook', 'woocommerce' ) . '</a></h2>';
|
||||
|
||||
// Get the webhooks count.
|
||||
$data_store = WC_Data_Store::load( 'webhook' );
|
||||
$count = count( $data_store->get_webhooks_ids() );
|
||||
$data_store = WC_Data_Store::load( 'webhook' );
|
||||
$num_webhooks = $data_store->get_count_webhooks_by_status();
|
||||
$count = array_sum( $num_webhooks );
|
||||
|
||||
if ( 0 < $count ) {
|
||||
$webhooks_table_list->process_bulk_action();
|
||||
|
|
Loading…
Reference in New Issue