Replace count with empty check
This commit is contained in:
parent
e6bcc1aeb6
commit
d38e22329f
|
@ -200,12 +200,7 @@ class WC_Admin_Log_Table_List extends WP_List_Table {
|
|||
ORDER BY source ASC
|
||||
" );
|
||||
|
||||
$source_count = count( $sources );
|
||||
|
||||
if ( ! $source_count ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( ! empty( $sources ) ) {
|
||||
$selected_source = isset( $_REQUEST['source'] ) ? $_REQUEST['source'] : '';
|
||||
?>
|
||||
<label for="filter-by-source" class="screen-reader-text"><?php _e( 'Filter by source', 'woocommerce' ); ?></label>
|
||||
|
@ -221,6 +216,7 @@ class WC_Admin_Log_Table_List extends WP_List_Table {
|
|||
</select>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare table list items.
|
||||
|
|
Loading…
Reference in New Issue