From 7d889b472a13e8778a09183156267e2e2c5ff57d Mon Sep 17 00:00:00 2001 From: Khan M Rashedun-Naby Date: Sun, 13 May 2018 23:40:07 +0600 Subject: [PATCH] Approach Cleaned --- includes/admin/class-wc-admin-log-table-list.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/admin/class-wc-admin-log-table-list.php b/includes/admin/class-wc-admin-log-table-list.php index 74e1cf8c12d..669867bbb6d 100644 --- a/includes/admin/class-wc-admin-log-table-list.php +++ b/includes/admin/class-wc-admin-log-table-list.php @@ -375,11 +375,11 @@ class WC_Admin_Log_Table_List extends WP_List_Table { $where_values[] = '%' . $wpdb->esc_like( wc_clean( wp_unslash( $_REQUEST['s'] ) ) ) . '%'; } - if ( ! empty( $where_conditions ) ) { - return $wpdb->prepare( 'WHERE 1 = 1 AND ' . implode( ' AND ', $where_conditions ), $where_values ); - } else { + if ( empty( $where_conditions ) ) { return ''; } + + return $wpdb->prepare( 'WHERE 1 = 1 AND ' . implode( ' AND ', $where_conditions ), $where_values ); } /**