From 7940694ce45696748e188386664b23ab5d8cc11f Mon Sep 17 00:00:00 2001 From: Khan M Rashedun-Naby Date: Tue, 16 Oct 2018 13:25:56 +0600 Subject: [PATCH 1/2] Removed Unnecessary Variable. --- includes/class-wc-ajax.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index 51500c6c916..a5f6db217e3 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -1429,9 +1429,8 @@ class WC_AJAX { wp_die( -1 ); } - $term = wc_clean( wp_unslash( $_GET['term'] ) ); - $exclude = array(); - $limit = ''; + $term = wc_clean( wp_unslash( $_GET['term'] ) ); + $limit = ''; if ( empty( $term ) ) { wp_die(); From 439bd54ce56fe56715195a4d0ec14a2ee4eae4e2 Mon Sep 17 00:00:00 2001 From: Khan M Rashedun-Naby Date: Tue, 16 Oct 2018 14:23:43 +0600 Subject: [PATCH 2/2] The variable should be 0 rather than empty string --- includes/class-wc-ajax.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php index a5f6db217e3..31c50a3e45b 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -1430,7 +1430,7 @@ class WC_AJAX { } $term = wc_clean( wp_unslash( $_GET['term'] ) ); - $limit = ''; + $limit = 0; if ( empty( $term ) ) { wp_die();