diff --git a/includes/admin/class-wc-admin-log-table-list.php b/includes/admin/class-wc-admin-log-table-list.php index 6b350a5bc76..afc7f8a3e76 100644 --- a/includes/admin/class-wc-admin-log-table-list.php +++ b/includes/admin/class-wc-admin-log-table-list.php @@ -334,6 +334,10 @@ class WC_Admin_Log_Table_List extends WP_List_Table { $where_conditions[] = 'source = %s'; $where_values[] = wc_clean( $_REQUEST['source'] ); } + if ( ! empty( $_REQUEST['s'] ) ) { + $where_conditions[] = 'message like %s'; + $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 ); diff --git a/includes/admin/views/html-admin-page-status-logs-db.php b/includes/admin/views/html-admin-page-status-logs-db.php index c4b64377bda..942d9ee77ec 100644 --- a/includes/admin/views/html-admin-page-status-logs-db.php +++ b/includes/admin/views/html-admin-page-status-logs-db.php @@ -6,8 +6,17 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } +$s = ''; +if ( isset( $_REQUEST['s'] ) ) { + $s = wc_clean( wp_unslash( $_REQUEST['s'] ) ); +} ?>
+ display(); ?>