How to display a button with “markup”? I created a custom module and in the code below the button is not rendered, there is only the text :

$form = ['#markup' =&gt; '&lt;button type="button" class="btn btn-success" disabled="disabled"&gt;Product unavailable&lt;/button&gt;']; 


How to display the button?

&lt;?php

/**
 * @file
 * Hook implementations of commerce_add_to_cart_access module.
 */

use Drupal\commerce_product\Entity\ProductType;
use Drupal\commerce_product\Entity\ProductVariationType;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Url;

function commerce_add_to_cart_access_form_commerce_order_item_add_to_cart_form_alter(&amp;$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
  // Your original code to get store owner.
  $current_store = \Drupal::service('commerce_store.current_store');
  $owner = $current_store-&gt;getStore()-&gt;getOwner();
  if (!$owner-&gt;hasRole('marchand_premium')) {
    // Overwrite the whole form markup!
    $form = ['#markup' =&gt; '&lt;button type="button" class="btn btn-success" disabled="disabled"&gt;Product unavailable&lt;/button&gt;'];        
  }
}
You can use the inline_template to solve the problem:

// Delete the other button.
unset($form);
$form['submit'] = [
  '#type' =&gt; 'inline_template',
  '#template' =&gt; '&lt;button type="button" class="btn btn-success" disabled="disabled"&gt;Product unavailable&lt;/button&gt;',
];