Commit 7bc6afdb authored by Victor Bourgade's avatar Victor Bourgade Committed by Victor Bourgade
Browse files

Issue #3166142 by Aporie, Arno2Mars: Rules action "perform transaction" is broken in Drupal 9

parent 4ae0cbc9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ use Drupal\commerce_price\Calculator;
 *   id = "commerce_funds_perform_transaction",
 *   label = @Translation("Perform transaction"),
 *   category = @Translation("Transaction"),
 *   context = {
 *   context_definitions = {
 *     "transaction" = @ContextDefinition("entity:commerce_funds_transaction",
 *       label = @Translation("Transaction"),
 *       description = @Translation("Specifies the transaction that should be performed.")
@@ -29,7 +29,7 @@ class TransactionPerform extends RulesActionBase {
  public function refineContextDefinitions(array $selected_data) {
    if ($selected_data && isset($selected_data['transaction'])) {
      $type = $selected_data['transaction']->getDataType();
      $this->getPluginDefinition()['context']['transaction']->setDataType($type);
      $this->getPluginDefinition()['context_definitions']['transaction']->setDataType($type);
    }
  }