Merge pull request #11377 from franticpsyx/variations-script-use-existing-form-var

[2.6] Use existing $form var to block/unblock specific `variations_form` element
This commit is contained in:
Claudio Sanches 2016-07-07 17:07:56 -03:00 committed by GitHub
commit a0c9b65fcb
1 changed files with 3 additions and 3 deletions

View File

@ -118,13 +118,13 @@
// Get a matchihng variation via ajax
data.product_id = $product_id;
$( '.variations_form' ).block({
$form.block( {
message: null,
overlayCSS: {
background: '#fff',
opacity: 0.6
}
});
} );
$xhr = $.ajax( {
url: wc_cart_fragments_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'get_variation' ),
@ -140,7 +140,7 @@
}
},
complete: function() {
$( '.variations_form' ).unblock();
$form.unblock();
}
} );
} else {