From a3ffd7284241b8ae7270161e841cf08d86e8d605 Mon Sep 17 00:00:00 2001 From: claudiulodro Date: Thu, 2 Nov 2017 09:16:17 -0700 Subject: [PATCH] Packages are shippable until proven otherwise --- includes/class-wc-shipping.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/includes/class-wc-shipping.php b/includes/class-wc-shipping.php index 5aa4159c3fa..bf0fa7b1dc4 100644 --- a/includes/class-wc-shipping.php +++ b/includes/class-wc-shipping.php @@ -132,8 +132,6 @@ class WC_Shipping { } /** - * Loads all shipping methods which are hooked in. If a $package is passed some methods may add themselves conditionally. - * * Loads all shipping methods which are hooked in. * If a $package is passed some methods may add themselves conditionally and zones will be used. * @@ -263,7 +261,7 @@ class WC_Shipping { } /** - * Allow packages to be reorganized after calculate the shipping. + * Allow packages to be reorganized after calculating the shipping. * * This filter can be used to apply some extra manipulation after the shipping costs are calculated for the packages * but before Woocommerce does anything with them. A good example of usage is to merge the shipping methods for multiple @@ -299,7 +297,7 @@ class WC_Shipping { * @return array|bool */ public function calculate_shipping_for_package( $package = array(), $package_key = 0 ) { - if ( ! $this->enabled || empty( $package ) || ! $this->is_package_shippable( $package ) ) { + if ( ! $this->enabled || empty( $package ) || ( $package['destination']['country'] && ! $this->is_package_shippable( $package ) ) ) { return false; }