clean and quiet debug notices

There are a bunch of debug notices when the user has not set anything
for their tax class (in the admin). This make all of them clean and
quiet in the header of the site and on the checkout page.
This commit is contained in:
curtismchale 2012-03-19 11:29:38 -07:00
parent 165863e292
commit 77893517e1
1 changed files with 6 additions and 6 deletions

View File

@ -29,10 +29,10 @@ class WC_Tax {
if (!empty($tax_rates)) foreach( $tax_rates as $rate ) : if (!empty($tax_rates)) foreach( $tax_rates as $rate ) :
// Standard Rate? // Standard Rate?
if (!$rate['class']) $rate['class'] = '*'; if ( isset( $rate['class'] ) && !$rate['class']) $rate['class'] = '*';
// Add entry for each country/state - each will hold all matching rates // Add entry for each country/state - each will hold all matching rates
if ($rate['countries']) foreach ($rate['countries'] as $country => $states) : if ( isset( $rate['countries'] ) && $rate['countries']) foreach ($rate['countries'] as $country => $states) :
if ($states) : if ($states) :
@ -65,13 +65,13 @@ class WC_Tax {
endforeach; endforeach;
endforeach; endforeach;
if (!empty($local_tax_rates)) foreach( $local_tax_rates as $rate ) : if ( isset( $rate['countries'] ) && !empty($local_tax_rates)) foreach( $local_tax_rates as $rate ) :
// Standard Rate? // Standard Rate?
if (!$rate['class']) $rate['class'] = '*'; if (!$rate['class']) $rate['class'] = '*';
if (!$rate['label']) : if ( isset( $rate['label'] ) && !$rate['label']) :
$rate['label'] = $woocommerce->countries->tax_or_vat(); $rate['label'] = $woocommerce->countries->tax_or_vat();
// Add % to label // Add % to label
@ -537,4 +537,4 @@ class woocommerce_tax extends WC_Tax {
public function __construct() { public function __construct() {
_deprecated_function( 'woocommerce_tax', '1.4', 'WC_Tax()' ); _deprecated_function( 'woocommerce_tax', '1.4', 'WC_Tax()' );
} }
} }