A court may order pendente lite relief consisting of a custody or visitation order pursuant to Part 2 (commencing with Section 3020) of Division 8, if the court finds both of the following:
(a) A parent and child relationship exists pursuant to Section 7540 or 7541.
(b) The custody or visitation order would be in the best interest of the child.
(Amended by Stats. 2018, Ch. 876, Sec. 46. (AB 2684) Effective January 1, 2019.)