From 333d4de747b46ae8187fce3c836c12120d6df58d Mon Sep 17 00:00:00 2001 From: Patrick Garman Date: Tue, 21 Aug 2012 16:53:27 -0500 Subject: [PATCH] $package data would be good to have when filtering if shipping methods are going to be available. --- classes/shipping/class-wc-shipping-method.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/shipping/class-wc-shipping-method.php b/classes/shipping/class-wc-shipping-method.php index ce25e3a8f7a..c8b426bc72d 100644 --- a/classes/shipping/class-wc-shipping-method.php +++ b/classes/shipping/class-wc-shipping-method.php @@ -185,7 +185,7 @@ class WC_Shipping_Method extends WC_Settings_API { if ( ! in_array( $package['destination']['country'], $ship_to_countries ) ) return false; endif; - return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', true ); + return apply_filters( 'woocommerce_shipping_' . $this->id . '_is_available', true, $package ); } /**