WooCommerce: Stop scrolling to message on checkout page

jQuery( document ).ajaxComplete( function() {
    if ( jQuery( 'body' ).hasClass( 'woocommerce-checkout' ) || jQuery( 'body' ).hasClass( 'woocommerce-cart' ) {
        jQuery( 'html, body' ).stop();
    }
} );