class DefaultTaxRateResolver in Commerce Core 8.2
Returns the tax zone's default tax rate.
Hierarchy
- class \Drupal\commerce_tax\Resolver\DefaultTaxRateResolver implements TaxRateResolverInterface
Expanded class hierarchy of DefaultTaxRateResolver
1 string reference to 'DefaultTaxRateResolver'
- commerce_tax.services.yml in modules/
tax/ commerce_tax.services.yml - modules/tax/commerce_tax.services.yml
1 service uses DefaultTaxRateResolver
File
- modules/
tax/ src/ Resolver/ DefaultTaxRateResolver.php, line 12
Namespace
Drupal\commerce_tax\ResolverView source
class DefaultTaxRateResolver implements TaxRateResolverInterface {
/**
* {@inheritdoc}
*/
public function resolve(TaxZone $zone, OrderItemInterface $order_item, ProfileInterface $customer_profile) {
return $zone
->getDefaultRate();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DefaultTaxRateResolver:: |
public | function |
Resolves the tax rate for the given tax zone. Overrides TaxRateResolverInterface:: |
|
TaxRateResolverInterface:: |
constant |