Fixes #12352 - cater for just one item selected in a multiselect list
This commit is contained in:
parent
0bc346436b
commit
1e8d9d4c95
|
@ -114,8 +114,8 @@
|
|||
$( document.body ).trigger( 'wc_backbone_modal_before_update', this._target );
|
||||
|
||||
$.each( $( 'form', this.$el ).serializeArray(), function( index, item ) {
|
||||
item.name = item.name.replace( '[]', '' );
|
||||
if ( data.hasOwnProperty( item.name ) ) {
|
||||
if ( item.name.indexOf( '[]' ) != -1 ) {
|
||||
item.name = item.name.replace( '[]', '' );
|
||||
data[ item.name ] = $.makeArray( data[ item.name ] );
|
||||
data[ item.name ].push( item.value );
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue