|
14 | 14 | use Magento\Sales\Api\Data\OrderItemInterface; |
15 | 15 | use Magento\Sales\Api\OrderItemRepositoryInterface; |
16 | 16 | use Magento\Sales\Api\OrderRepositoryInterface; |
| 17 | +use Magento\Framework\App\ObjectManager; |
17 | 18 | use Magento\Tax\Helper\Data as TaxHelper; |
18 | 19 |
|
19 | 20 | /** |
@@ -67,22 +68,22 @@ class DataProvider |
67 | 68 | * @param OrderRepositoryInterface $orderRepository |
68 | 69 | * @param SearchCriteriaBuilder $searchCriteriaBuilder |
69 | 70 | * @param OptionsProcessor $optionsProcessor |
70 | | - * @param TaxHelper $taxHelper |
| 71 | + * @param TaxHelper|null $taxHelper |
71 | 72 | */ |
72 | 73 | public function __construct( |
73 | 74 | OrderItemRepositoryInterface $orderItemRepository, |
74 | 75 | ProductRepositoryInterface $productRepository, |
75 | 76 | OrderRepositoryInterface $orderRepository, |
76 | 77 | SearchCriteriaBuilder $searchCriteriaBuilder, |
77 | 78 | OptionsProcessor $optionsProcessor, |
78 | | - TaxHelper $taxHelper |
| 79 | + ?TaxHelper $taxHelper = null |
79 | 80 | ) { |
80 | 81 | $this->orderItemRepository = $orderItemRepository; |
81 | 82 | $this->productRepository = $productRepository; |
82 | 83 | $this->orderRepository = $orderRepository; |
83 | 84 | $this->searchCriteriaBuilder = $searchCriteriaBuilder; |
84 | 85 | $this->optionsProcessor = $optionsProcessor; |
85 | | - $this->taxHelper = $taxHelper; |
| 86 | + $this->taxHelper = $taxHelper ?? ObjectManager::getInstance()->get(TaxHelper::class); |
86 | 87 | } |
87 | 88 |
|
88 | 89 | /** |
|
0 commit comments