Only update checkout when form.checkout exists

Fixes #7422
This commit is contained in:
Mike Jolley 2015-02-16 14:57:04 +00:00
parent ac8d97ab54
commit 4cfabb8e16
2 changed files with 5 additions and 1 deletions

View File

@ -166,6 +166,10 @@ jQuery( function( $ ) {
wc_checkout_form.xhr.abort(); wc_checkout_form.xhr.abort();
} }
if ( $( 'form.checkout' ).size() === 0 ) {
return;
}
var shipping_methods = []; var shipping_methods = [];
$( 'select.shipping_method, input[name^=shipping_method][type=radio]:checked, input[name^=shipping_method][type=hidden]' ).each( function( index, input ) { $( 'select.shipping_method, input[name^=shipping_method][type=radio]:checked, input[name^=shipping_method][type=hidden]' ).each( function( index, input ) {

File diff suppressed because one or more lines are too long