From 6ea07a1a0b0380c59cc739b7d468c1bb44850e63 Mon Sep 17 00:00:00 2001 From: Giorgos Kontopoulos Date: Sun, 4 Jul 2021 09:57:29 +0300 Subject: [PATCH 1/2] fix drupal 9 problem Error: Interface DrupalComponentPluginConfigurablePluginInterface not found in include() (line 20 of /app/modules/custom/commerce_fee/src/Plugin/Commerce/Fee/FeeInterface.php) --- src/Plugin/Commerce/Fee/FeeInterface.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugin/Commerce/Fee/FeeInterface.php b/src/Plugin/Commerce/Fee/FeeInterface.php index 571cbf4..1106fc0 100644 --- a/src/Plugin/Commerce/Fee/FeeInterface.php +++ b/src/Plugin/Commerce/Fee/FeeInterface.php @@ -3,7 +3,7 @@ namespace Drupal\commerce_fee\Plugin\Commerce\Fee; use Drupal\commerce_fee\Entity\FeeInterface as FeeEntityInterface; -use Drupal\Component\Plugin\ConfigurablePluginInterface; +use Drupal\Component\Plugin\ConfigurableInterface; use Drupal\Component\Plugin\PluginInspectionInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Plugin\PluginFormInterface; @@ -17,7 +17,7 @@ * @see \Drupal\commerce_fee\Plugin\Commerce\Fee\OrderFeeInterface * @see \Drupal\commerce_fee\Plugin\Commerce\Fee\OrderItemFeeInterface */ -interface FeeInterface extends ConfigurablePluginInterface, PluginFormInterface, PluginInspectionInterface { +interface FeeInterface extends ConfigurableInterface, PluginFormInterface, PluginInspectionInterface { /** * Gets the fee entity type ID. From a61cb2960c2b70309b1bff0e4c26ff05c2d2fc48 Mon Sep 17 00:00:00 2001 From: Giorgos Kontopoulos Date: Sun, 4 Jul 2021 10:01:26 +0300 Subject: [PATCH 2/2] Add instructions for composer based patch --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 871d516..447c0b8 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,16 @@ Commerce Fee submodule Note: a modification is necessary in commerce file: commerce/src/Plugin/Field/FieldType/PluginItemDeriver.php * Modify method getDerivativeDefinitions() * add commerce_fee plugin to the $plugin_types array: 'commerce_fee' => $this->t('Commerce fee'), + +OR + +Get latest working patch from [here](https://www.drupal.org/project/commerce/issues/2903716) and add it to your `composer.json` similar to this and run composer install to patch commerce. + + "extra": { + "enable-patching": true, + "patches": { + ... + "drupal/commerce": { + "Implement the ability to add fees to an order dgo.to/2903716": "https://www.drupal.org/files/issues/2020-11-18/add-plugin-type-2903716-72.patch" + }, + ... \ No newline at end of file