query

Remove query condition in Drupal 8

/**
 * Implements hook_query_QUERY_ID_alter().
 */
function mymodule_query_taxonomy_term_access_alter($query) {
  /** @var \Drupal\Core\Database\Query\Select $query */
  $conditions = &$query->conditions();
  foreach ($conditions as $i => $condition) {
    if (isset($condition['field']) && $condition['field'] === 't.default_langcode') {
      unset($conditions[$i]);
    }
  }
}