Written on 12. December 2021 by Lennart Christensen

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();
    }
} );