You are here

function commerce_tax_form_commerce_store_form_alter in Commerce Core 8.2

Implements hook_form_BASE_FORM_ID_alter() for 'commerce_store_form'.

File

modules/tax/commerce_tax.module, line 77
Provides tax functionality.

Code

function commerce_tax_form_commerce_store_form_alter(&$form, FormStateInterface $form_state) {
  if (isset($form['prices_include_tax']) || isset($form['tax_registrations'])) {
    $form['tax_settings'] = [
      '#type' => 'details',
      '#title' => t('Tax settings'),
      '#weight' => 90,
      '#open' => TRUE,
    ];
    $form['prices_include_tax']['#group'] = 'tax_settings';
    $form['tax_registrations']['#group'] = 'tax_settings';
  }
}