How to add an Ajax call to an element that already has callback set? I want to add an ajax callback to a form element inside a form_alter, but it already has 2 callbacks assigned to it.
When I review:
$form['payment_information']['payment_method']['#ajax']['callback']

it has 2 callbacks already assigned to it.
If I do this:
$form['payment_information']['payment_method']['#ajax'] = [
  'callback' =&gt; '_sia_general_get_fee',
  'event' =&gt; 'click',
];

My callback is hit on click; but of course, the other 2 callbacks are wiped out and do not work.
If I add something like this:
$form['payment_information']['payment_method']['#ajax']['callback'][] = '_sia_general_get_fee';

then the other callbacks are called; but mine is not - I suspect since I no longer of an event defined.
I am also not sure how the other ajax calls work when they have no events defined for them.
Is there any way to do this?
I doubt that the array you've found really assigns 2 callbacks. It's rather an array defining a class and a method for a single callback:
'callback' =&gt; ['Drupal\foo\BarClass', 'ajaxCallback']

In fact, you can only set one callback in an #ajax element. If you want to override a callback you have to include the overridden callback in your code:
Drupal\foo\BarClass::ajaxCallback($form, $form_state)

and add your ajax commands to the returned ajax response (or in case the original method returns a render array you can either add your own content to the array or transform the render array into an ajax command which you return with your own commands in an ajax response).
Caveat: This only works if the overridden callback is static. If it runs in an instantiated object you have to override the class method itself.