Unset the "please wait" in drupal commerce I've got a product with different taxonomy like "S" "M" "L".
When you change the size in the display product, it shows the ajax div
"Please wait..."
I've tried

function bartik_form_commerce_cart_add_to_cart_form_alter(&amp;$form, &amp;$form_state, $form_id) {
unset($form['attributes']['field_size']['#ajax']['progress']['message']);
}


If I have a look at it with dms($form) I see attributes -> field_size -> #ajax -> callback(commerce_cart_add_to_cart_form_attributes_refresh)

There is not message. How can I get rid of it?

Thanks in advance.
A simple way could be to hide it with CSS, but what is displayed by Drupal is actually configurable. The throbber with the Please wait... message is the default behavior but you can change it to a number of things. What you need to look at is the #ajax['progress'] attribute.

Usually #ajax['progress'] is not set in the form, and Drupal will add the default throbber with the Please wait... message in the JavaScript that handle the ajax request. The solution it quite simple, all you need to do is to set it like this:

$form['element']['#ajax']['progress'] = array('type' =&gt; 'throbber');


It will kill the message and only show the throbber. There are a number of ways to configure what Drupal does to show the user progress - you can read all about it in the link above.