Exemple #1
0
 private function getBillingFields(Address $address)
 {
     $fields = $this->wp->applyFilters('jigoshop\\checkout\\billing_fields', $this->getDefaultBillingFields($address));
     if (!Country::isEU($this->options->get('general.country'))) {
         unset($fields['euvatno']);
     }
     return $fields;
 }
 /**
  * Checks whether provided customer needs to be taxed.
  *
  * @param Entity $customer Customer to check.
  *
  * @return boolean Whether customer needs to be taxed.
  */
 public function isTaxable(Entity $customer)
 {
     $country = $this->options->get('general.country');
     $customerCountry = $customer->getTaxAddress()->getCountry();
     if (Country::isEU($country)) {
         return Country::isEU($customerCountry);
     }
     return $country == $customerCountry;
 }