You are here

function commerce_paypal_post_update_4 in Commerce PayPal 8

Uninstall the flow field.

File

./commerce_paypal.post_update.php, line 119
Post update functions for Commerce PayPal.

Code

function commerce_paypal_post_update_4() {
  $original_storage_definitions = \Drupal::service('entity.last_installed_schema.repository')
    ->getLastInstalledFieldStorageDefinitions('commerce_payment_method');
  if (isset($original_storage_definitions['flow'])) {
    \Drupal::service('field_definition.listener')
      ->onFieldDefinitionDelete($original_storage_definitions['flow']);
    \Drupal::service('field_storage_definition.listener')
      ->onFieldStorageDefinitionDelete($original_storage_definitions['flow']);
  }
}