Commit 398bef82 authored by Alex Domasevich's avatar Alex Domasevich Committed by Jonathan Sacksick
Browse files

Issue #3263586 by alexdoma, narendra.rajwar27, cspitzlay: Mismatched entity...

Issue #3263586 by alexdoma, narendra.rajwar27, cspitzlay: Mismatched entity and/or field definitions for commerce_shipping_method.
parent ae3f25ac
Loading
Loading
Loading
Loading
+13 −0
Changes for commerce_shipping.install: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -129,3 +129,16 @@ function commerce_shipping_update_8205() {
function commerce_shipping_update_8206() {
  \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
}

/**
 * Uninstall the created / changed fields added by content_translation.
 */
function commerce_shipping_update_8207() {
  $definition_update_manager = \Drupal::entityDefinitionUpdateManager();

  foreach (['content_translation_created', 'content_translation_changed'] as $field_name) {
    if ($field_storage_definition = $definition_update_manager->getFieldStorageDefinition($field_name, 'commerce_shipping_method')) {
      $definition_update_manager->uninstallFieldStorageDefinition($field_storage_definition);
    }
  }
}
+2 −2
Changes for src/Event/FilterShippingMethodsEvent.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -2,15 +2,15 @@

namespace Drupal\commerce_shipping\Event;

use Drupal\commerce\EventBase;
use Drupal\commerce_shipping\Entity\ShipmentInterface;
use Symfony\Component\EventDispatcher\Event;

/**
 * Defines the event for filtering the available shipping methods.
 *
 * @see \Drupal\commerce_shipping\Event\ShippingEvents
 */
class FilterShippingMethodsEvent extends Event {
class FilterShippingMethodsEvent extends EventBase {

  /**
   * The shipping methods.
+2 −2
Changes for src/Event/ShippingRatesEvent.php: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -2,16 +2,16 @@

namespace Drupal\commerce_shipping\Event;

use Drupal\commerce\EventBase;
use Drupal\commerce_shipping\Entity\ShipmentInterface;
use Drupal\commerce_shipping\Entity\ShippingMethodInterface;
use Symfony\Component\EventDispatcher\Event;

/**
 * Defines the event for reacting to shipping rate calculation.
 *
 * @see \Drupal\commerce_shipping\Event\ShippingEvents
 */
class ShippingRatesEvent extends Event {
class ShippingRatesEvent extends EventBase {

  /**
   * The shipping rates.