WooCommerce standards fix.

This commit is contained in:
Matheus Lopes 2016-04-04 17:59:53 +00:00
parent c9ee861f57
commit 61b8fece41
1 changed files with 5 additions and 5 deletions

View File

@ -154,12 +154,12 @@ class WC_Admin_Taxonomies {
return false;
});
jQuery( document ).ajaxComplete( function( event, xhr, options ) {
if (xhr && xhr.readyState === 4 && xhr.status === 200
&& options.data && options.data.indexOf('action=add-tag') >= 0) {
jQuery( document ).ajaxComplete( function( event, request, options ) {
if ( request && request.readyState === 4 && request.status === 200
&& options.data && options.data.indexOf('action=add-tag') >= 0 ) {
var res = wpAjax.parseAjaxResponse(xhr.responseXML, 'ajax-response');
if (!res || res.errors) {
var res = wpAjax.parseAjaxResponse( request.responseXML, 'ajax-response' );
if ( !res || res.errors ) {
return;
}
// Clear Thumbnail fields on submit