/** * Returns the destination Country and State tax rate */ public function get_tax_destination_rate() { $rates = array(); if ($this->is_taxable() && self::get_options()->get('fflcommerce_calc_taxes') == 'yes') { $tax = new fflcommerce_tax(); foreach ($tax->get_tax_classes_for_customer() as $tax_class) { if (!in_array($tax_class, $this->get_tax_classes())) { continue; } $rate = $tax->get_rate($tax_class); if ($rate > 0) { $rates[$tax_class] = array('rate' => $rate, 'is_not_compound_tax' => !$tax->is_compound_tax()); } } } return $rates; }