(a) Upon the request of both parents, the court shall include in the judgment or order determining paternity an order changing the name of the child to a name agreed upon by the parents.
(b) Except as provided in par. (a), the court may include in the judgment or order determining paternity an order changing the surname of the child to a surname that consists of the surnames of both parents separated by a hyphen or, if one or both parents have more than one surname, of one of the surnames of each parent separated by a hyphen, if all of the following apply:
1. Only one parent requests that the child's name be changed, or both parents request that the child's name be changed but each parent requests a different name change.
2. The court finds that such a name change is in the child's best interest.
(c) Section 786.36 does not apply to a name change under this subsection.