Merge pull request #25950 from woocommerce/revert-25382-master

Revert "Improved performance when saving variations"
This commit is contained in:
Peter Fabian 2020-03-17 17:20:56 +01:00 committed by GitHub
commit f41302bfe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 25 deletions

View File

@ -447,31 +447,7 @@ jQuery( function( $ ) {
* @return {Object}
*/
get_variations_fields: function( fields ) {
var data = {};
$( ':input', fields ).each( function( index, elem ) {
var $input = $( elem );
// Bypass inputs without name att
if ( ! elem.name ) {
return;
}
// Bypass non-checked checkboxes and radio buttons.
if ( ( $input.is( ':radio' ) || $input.is( ':checkbox' ) ) && ! $input.is( ':checked' ) ) {
return;
}
// Bypass disabled fields.
if ( true === $input.prop( 'disabled' ) ) {
return;
}
data[ elem.name ] = elem.value;
});
var data = $( ':input', fields ).serializeJSON();
$( '.variations-defaults select' ).each( function( index, element ) {
var select = $( element );