Jake Vanderwerf
2026-09-09 8318f60480aedd4aa1e64dc35468247dfbba9316
inc/registrar/helpers/AddCustomFields.php
@@ -73,8 +73,15 @@
      foreach ($this->registrar->getFields(false) as $name => $config) {
         $metaType = $this->getSchemaType($config);
         $schema = $metaType === 'array' ? $this->determineSchema($config) : true;
         $rawSchema = in_array($metaType, ['array', 'object'], true)
            ? $this->determineSchema($config)
            : true;
         $schema = is_array($rawSchema) ? $this->schema($rawSchema) : $rawSchema;
         //Allow for null
         if ($metaType === 'object') {
            $metaType = ['object', 'null'];
         }
         register_post_meta($this->registrar->getBased(), jvbCheckBase($name), [
            'single'            => true,
            'type'              => $metaType,
@@ -163,16 +170,16 @@
            $required[] = $name;
         }
         $schema = $this->determineSchema($c);
         if (is_array($schema)) {
            if (array_key_exists('default', $schema)) {
               $args['default'] = $schema['default'];
         $tmp = $this->determineSchema($c);
         if (is_array($tmp)) {
            if (array_key_exists('default', $tmp)) {
               $args['default'] = $tmp['default'];
            }
            if (array_key_exists('enum', $schema)) {
               $args['enum'] = $schema['enum'];
            if (array_key_exists('enum', $tmp)) {
               $args['enum'] = $tmp['enum'];
            }
            if (array_key_exists('format', $schema)) {
               $args['format'] = $schema['format'];
            if (array_key_exists('format', $tmp)) {
               $args['format'] = $tmp['format'];
            }
         }
         if (array_key_exists('default', $c)) {
@@ -201,7 +208,7 @@
   protected function schemaLocation(array $config):array|true
   {
      return [
         'type'          => 'object',
         'type'          => ['object', 'null'],
         'properties'    => [
            'address'   => [
               'type'  => 'string'