Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
16 | public function getTaxCode(OrderItemInterface $item): string |
||
17 | { |
||
18 | /** @var ProductVariantInterface $variant */ |
||
19 | $variant = $item->getVariant(); |
||
20 | /** @var AvataxAwareInterface $product */ |
||
21 | $product = $variant->getProduct(); |
||
22 | |||
23 | $taxCode = 'P0000000'; |
||
24 | if ($product->getAvataxCode() !== null) { |
||
25 | /** @var string $taxCode */ |
||
26 | $taxCode = $product->getAvataxCode(); |
||
27 | } |
||
28 | |||
29 | return $taxCode; |
||
30 | } |
||
32 |