Using this question Refresh the page after product remove from cart Woocommerce I added the below code to the head of my website to refresh the WooCommerce cart page when a product is deleted but it does not work. I need the page to refresh as I have a custom product image and it's merging into the product below when deleted unless the cart page is refreshed.
<script>
jQuery('body').on('updated_cart_totals',function() {
jQuery( '.shop_table.cart' ).closest( 'form' ).find( 'input[name="update_cart"]' ).prop( 'disabled', false ); // this will enable the button.
//location.reload(); // uncomment this line to refresh the page.
});
</script>