/** * set vat flag according to delivery address */ protected function setVatFlag($customer_id) { $Order = new ecommerce_order(); if ($this->guest_customer) { $this->include_vat = $Order->isVatEligibleByCountry($this->delivery_country); } else { $this->include_vat = $Order->isVatEligible($this->delivery_address_id, $customer_id); } }