From f9e43b874c843b42ad5fbc34c57806e5f7ba6908 Mon Sep 17 00:00:00 2001 From: Nathan Dawson Date: Thu, 28 May 2015 00:54:05 +0100 Subject: [PATCH] Resolve blank shipping information bug. Fixes #8235 Setting the 'woocommerce_cart_needs_shipping' filter to true means the shipping fields can be shown for virtual products. Whether to check shipping details should be based on whether they're shown and not whether the cart needs shipping. --- includes/class-wc-checkout.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/class-wc-checkout.php b/includes/class-wc-checkout.php index 3d6ec166e02..7491ab7ed34 100644 --- a/includes/class-wc-checkout.php +++ b/includes/class-wc-checkout.php @@ -406,7 +406,7 @@ class WC_Checkout { foreach ( $this->checkout_fields as $fieldset_key => $fieldset ) { // Skip shipping if not needed - if ( $fieldset_key == 'shipping' && ( $this->posted['ship_to_different_address'] == false || ! WC()->cart->needs_shipping() ) ) { + if ( $fieldset_key == 'shipping' && ( $this->posted['ship_to_different_address'] == false || ! WC()->cart->needs_shipping_address() ) ) { $skipped_shipping = true; continue; }