From 913b8e84bf176331eae6dd34756b6d6fc11bf828 Mon Sep 17 00:00:00 2001 From: Naveen giri <1naveengiri@gmail.com> Date: Tue, 26 Feb 2019 18:31:34 +0530 Subject: [PATCH] Fix wpcs error and avoid unnecessary checks --- 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 086a381f9e6..89cda31924a 100644 --- a/includes/class-wc-ajax.php +++ b/includes/class-wc-ajax.php @@ -632,7 +632,7 @@ class WC_AJAX { ob_start(); $attributes = $product->get_attributes( 'edit' ); $i = -1; - if( isset( $data['attribute_names'] ) && !empty( $data['attribute_names'] ) ){ + if( ! empty( $data['attribute_names'] ) ) { foreach ( $data['attribute_names'] as $attribute_name ) { $attribute = isset( $attributes[ sanitize_title( $attribute_name ) ] ) ? $attributes[ sanitize_title( $attribute_name ) ] : false; if ( ! $attribute ) {