function commerce_recurring_update_8102 in Commerce Recurring Framework 8
Make the billing_schedule field required on subscriptions.
File
- ./
commerce_recurring.install, line 75 - Install, update and uninstall functions for the commerce_recurring module.
Code
function commerce_recurring_update_8102() {
$entity_definition_update = \Drupal::entityDefinitionUpdateManager();
$field_definition = $entity_definition_update
->getFieldStorageDefinition('billing_schedule', 'commerce_subscription');
$field_definition
->setRequired(TRUE);
$entity_definition_update
->updateFieldStorageDefinition($field_definition);
}