Adjust #8165 to deal with 0
This commit is contained in:
parent
79a5c2e98d
commit
c01bc43369
|
@ -982,7 +982,7 @@ class WC_Meta_Box_Product_Data {
|
|||
$attribute_position = $_POST['attribute_position'];
|
||||
$attribute_names_max_key = max( $attribute_names );
|
||||
|
||||
for ( $i = 0; $i < $attribute_names_max_key; $i++ ) {
|
||||
for ( $i = 0; $i <= $attribute_names_max_key; $i++ ) {
|
||||
if ( empty( $attribute_names[ $i ] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -590,7 +590,7 @@ class WC_AJAX {
|
|||
$attribute_position = $data['attribute_position'];
|
||||
$attribute_names_max_key = max( $attribute_names );
|
||||
|
||||
for ( $i = 0; $i < $attribute_names_max_key; $i++ ) {
|
||||
for ( $i = 0; $i <= $attribute_names_max_key; $i++ ) {
|
||||
if ( empty( $attribute_names[ $i ] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue