diff --git a/modules/tax/src/TaxOrderProcessor.php b/modules/tax/src/TaxOrderProcessor.php index 690ccc8..6a93453 100644 --- a/modules/tax/src/TaxOrderProcessor.php +++ b/modules/tax/src/TaxOrderProcessor.php @@ -208,7 +208,7 @@ class TaxOrderProcessor implements OrderProcessorInterface { if (empty($this->taxTypes)) { $tax_type_storage = $this->entityTypeManager->getStorage('commerce_tax_type'); $this->taxTypes = $tax_type_storage->loadByProperties(['status' => TRUE]); - uasort($entities, [TaxType::class, 'sort']); + uasort($this->taxTypes, [TaxType::class, 'sort']); } return $this->taxTypes; diff --git a/modules/tax/src/TaxTypeManager.php b/modules/tax/src/TaxTypeManager.php index 251c358..71a5033 100644 --- a/modules/tax/src/TaxTypeManager.php +++ b/modules/tax/src/TaxTypeManager.php @@ -13,6 +13,17 @@ use Drupal\Core\Plugin\DefaultPluginManager; class TaxTypeManager extends DefaultPluginManager { /** + * Default values for each tax type plugin. + * + * @var array + */ + protected $defaults = [ + 'id' => '', + 'label' => '', + 'weight' => 0, + ]; + + /** * Constructs a new TaxTypeManager object. * * @param \Traversable $namespaces