How to disable shipping completely for a WooCommerce product type?
问题 I would like to disable requirement to select shipping method for a particular product type (here "booking" product type) on the checkout. So they should be able to buy product without shipping method. 回答1: To disable shipping completely* when a specific product type is in cart you will use the following: add_filter( 'woocommerce_cart_needs_shipping', 'filter_cart_needs_shipping_callback' ); function filter_cart_needs_shipping_callback( $needs_shipping ){ foreach ( WC()->cart->get_cart() as