src/Forms/Fields/Types/ChoiceType.php
protected function saveTermMultipleValue($value, int $term_id)
    {
        $previous = get_term_meta($term_id, $this->getName(), false);

        if (is_null($value) || empty($value)) {
            delete_term_meta($term_id, $this->getName());
        } elseif (empty($previous) && is_array($value)) {
            array_walk($value, function ($val) use ($term_id) {
                add_term_meta($term_id, $this->getName(), $val, false);
            });
        } else {
            delete_term_meta($term_id, $this->getName());

            array_walk($value, function ($val) use ($term_id) {
                add_term_meta($term_id, $this->getName(), $val, false);
            });
        }
    }
protected function saveTermMultipleValue($value, int $term_id)
    {
        $previous = get_term_meta($term_id, $this->getName(), false);

        if (is_null($value) || empty($value)) {
            delete_term_meta($term_id, $this->getName());
        } elseif (empty($previous) && is_array($value)) {
            array_walk($value, function ($val) use ($term_id) {
                add_term_meta($term_id, $this->getName(), $val, false);
            });
        } else {
            delete_term_meta($term_id, $this->getName());

            array_walk($value, function ($val) use ($term_id) {
                add_term_meta($term_id, $this->getName(), $val, false);
            });
        }
    }
protected function saveTermMultipleValue ( $ value , int $ term_id ) { $ previous = get_term_meta ( $ term_id , $ this -> getName ( ) , false ) ; if ( is_null ( $ value ) || empty ( $ value ) ) { delete_term_meta ( $ term_id , $ this -> getName ( ) ) ; } elseif ( empty ( $ previous ) && is_array ( $ value ) ) { array_walk ( $ value , function ( $ val ) use ( $ term_id ) { add_term_meta ( $ term_id , $ this -> getName ( ) , $ val , false ) ; } ) ; } else { delete_term_meta ( $ term_id , $ this -> getName ( ) ) ; array_walk ( $ value , function ( $ val ) use ( $ term_id ) { add_term_meta ( $ term_id , $ this -> getName ( ) , $ val , false ) ; } ) ; } }
Handle field multiple term meta registration.

@param $value
@param int $term_id
Handle field multiple term meta registration .