From a203c344749e4642eca071bfdd370ddb2fa8b4ac Mon Sep 17 00:00:00 2001 From: Manos Psychogyiopoulos Date: Tue, 26 Apr 2016 16:21:42 +0300 Subject: [PATCH] fix undefined package notice in legacy flat rate method --- .../legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/includes/shipping/legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php b/includes/shipping/legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php index cac2154089b..bc68df244ea 100644 --- a/includes/shipping/legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php +++ b/includes/shipping/legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php @@ -276,15 +276,13 @@ class WC_Shipping_Legacy_Flat_Rate extends WC_Shipping_Method { $extra_rate = $rate; $extra_rate['id'] = $this->id . ':' . urldecode( sanitize_title( $this_option[0] ) ); $extra_rate['label'] = $this_option[0]; - $extra_cost = $this->get_extra_cost( $this_option[1], $this_option[2], $package ); + $extra_cost = $this->get_extra_cost( $this_option[1], $this_option[2], $rate['package'] ); if ( is_array( $extra_rate['cost'] ) ) { $extra_rate['cost']['order'] = $extra_rate['cost']['order'] + $extra_cost; } else { $extra_rate['cost'] += $extra_cost; } - $rate['package'] = $package; - $this->add_rate( $extra_rate ); } }