public function getProductTaxClasses()
    {
        /** @var \Magento\Tax\Model\ResourceModel\TaxClass\Collection $taxCollection */
        $classes       = [];
        $taxCollection = $this->taxClass->getCollection();
        $taxCollection->setClassTypeFilter(ClassModel::TAX_CLASS_TYPE_PRODUCT);

        /** @var ClassModel $tax */
        foreach ($taxCollection as $tax) {
            $classes[] = [
                'id'  => $tax->getId(),
                'key' => $tax->getClassName()
            ];
        }

        return $classes;
    }
public function getProductTaxClasses()
    {
        /** @var \Magento\Tax\Model\ResourceModel\TaxClass\Collection $taxCollection */
        $classes       = [];
        $taxCollection = $this->taxClass->getCollection();
        $taxCollection->setClassTypeFilter(ClassModel::TAX_CLASS_TYPE_PRODUCT);

        /** @var ClassModel $tax */
        foreach ($taxCollection as $tax) {
            $classes[] = [
                'id'  => $tax->getId(),
                'key' => $tax->getClassName()
            ];
        }

        return $classes;
    }
public function getProductTaxClasses ( ) { /** @var \Magento\Tax\Model\ResourceModel\TaxClass\Collection $taxCollection */ $ classes = [ ] ; $ taxCollection = $ this -> taxClass -> getCollection ( ) ; $ taxCollection -> setClassTypeFilter ( ClassModel :: TAX_CLASS_TYPE_PRODUCT ) ; /** @var ClassModel $tax */ foreach ( $ taxCollection as $ tax ) { $ classes [ ] = [ 'id' => $ tax -> getId ( ) , 'key' => $ tax -> getClassName ( ) ] ; } return $ classes ; }
Retrieves all product related tax classes
for Merchant API to pick up

@return array
Retrieves all product related tax classes for Merchant API to pick up