DefaultTaxRateResolver.php in Commerce Core 8.2
Namespace
Drupal\commerce_tax\ResolverFile
modules/tax/src/Resolver/DefaultTaxRateResolver.phpView source
<?php
namespace Drupal\commerce_tax\Resolver;
use Drupal\commerce_order\Entity\OrderItemInterface;
use Drupal\commerce_tax\TaxZone;
use Drupal\profile\Entity\ProfileInterface;
/**
* Returns the tax zone's default tax rate.
*/
class DefaultTaxRateResolver implements TaxRateResolverInterface {
/**
* {@inheritdoc}
*/
public function resolve(TaxZone $zone, OrderItemInterface $order_item, ProfileInterface $customer_profile) {
return $zone
->getDefaultRate();
}
}
Classes
Name | Description |
---|---|
DefaultTaxRateResolver | Returns the tax zone's default tax rate. |