Disabling the Requirement for a Shipping Address in WooCommerce Checkout

For sites that don’t ship products, there’s no need for a shipping address.

The following snippet should be enough:

add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false');