You are here

function commerce_file_product_variation_type_form_submit in Commerce File 8.2

Submission handler handler for commerce_file_form_commerce_product_variation_type_form_alter().

1 string reference to 'commerce_file_product_variation_type_form_submit'
commerce_file_form_commerce_product_variation_type_form_alter in ./commerce_file.module
Implements hook_form_BASE_FORM_ID_alter().

File

./commerce_file.module, line 172
Extends Commerce License with the ability to sell access to files.

Code

function commerce_file_product_variation_type_form_submit(array $form, FormStateInterface $form_state) {
  if ($form_state
    ->hasValue('license_trait_auto_configured')) {
    \Drupal::messenger()
      ->addMessage(t('The file download trait requires the license trait to work. The license trait has been enabled with a default configuration that supports file licenses.'));
  }
}