Skip to content

Commit

Permalink
fix: attribute value's are swapped after changing the order of the at…
Browse files Browse the repository at this point in the history
…tributes field is fixed #673 (#674)

* fix: attribute value's are swapped after changing the order of the attributes field is fixed #673

* fix: remove wc_clean while saving attribute values
  • Loading branch information
saimonh3 authored and sabbir1991 committed Oct 3, 2019
1 parent 9ef4a28 commit cddfcf0
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions includes/wc-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,9 @@ function dokan_process_product_meta( $post_id, $data = [] ) {

if ( isset( $data['attribute_names'] ) && is_array( $data['attribute_names'] ) && isset( $data['attribute_values'] ) && is_array( $data['attribute_values'] ) ) {
$attribute_names = array_map( 'wc_clean', $data['attribute_names'] );

$attribute_values = array();

foreach ( $data['attribute_values'] as $values ) {
$attribute_values[] = $values;
}
$attribute_values = array_map( function( $value ) {
return $value;
}, $data['attribute_values'] );

if ( isset( $data['attribute_visibility'] ) ) {
$attribute_visibility = array_map( 'absint' , $data['attribute_visibility'] );
Expand Down

0 comments on commit cddfcf0

Please sign in to comment.