Make use of unused $x var

This commit is contained in:
Mike Jolley 2016-06-07 14:10:23 +01:00
parent 847dea6a2d
commit 548fe93a97
1 changed files with 7 additions and 3 deletions

View File

@ -1756,17 +1756,21 @@ class WC_AJAX {
/**
* Search for products and echo json.
*
* @param string $x (default: '')
* @param string $term (default: '')
* @param string $post_types (default: array('product'))
*/
public static function json_search_products( $x = '', $post_types = array( 'product' ) ) {
public static function json_search_products( $term = '', $post_types = array( 'product' ) ) {
global $wpdb;
ob_start();
check_ajax_referer( 'search-products', 'security' );
$term = (string) wc_clean( stripslashes( $_GET['term'] ) );
if ( empty( $term ) ) {
$term = wc_clean( stripslashes( $_GET['term'] ) );
} else {
$term = wc_clean( $term );
}
if ( empty( $term ) ) {
die();