Fallen reality TV star Bethenny Frankel settled her custody battle with estranged hubby Jason Hoppy on Wednesday instead of returning to court to be grilled by her soon-to-be-ex’s attorney about calling him “white trash” and threatening to take away their child.

Bernard Clair, Hoppy’s attorney, confirmed the settlement.

“My client is delighted that this custody dispute has been resolved,” Clair said.

“The parties’ child will have the benefit of being raised by both parents and most importantly … his daughter will no longer be at the mercy of a high-profile courtroom battle,” Clair added.

Clair said the specific terms of the settlement are confidential, but friends close to the couple told The Post that Hoppy won equal time with and decision-making authority for his 4-year-old daughter, Bryn.

Frankel had sued for full custody.

Her attorney, Allan Mayefsky, did not return calls for comment.

The Skinnygirl mogul’s six-day custody trial was expected to proceed on June 11 after Frankel took the witness stand last week and claimed Hoppy vowed to “destroy” her after she filed for divorce.

She admitted she “cracked” during the split, calling the pharmaceutical sales rep “white trash” for getting an investor to finance the divorce.

She also admitted telling Hoppy, “I said you’re not going to see your daughter,” during a heated argument.

Recalling her husband’s insults and threats, Frankel said Hoppy shot back: “You’re a piece of s—t … We’re going all the way, baby. Buckle up!”

But after the settlement, Hoppy had nothing but warm wishes for his spouse.

“Jason wishes Bethenny only the best of luck, and he looks forward to sharing with her all of the joyous occasions, milestones, and blessings that will be coming up in his daughter’s future,” Clair said.

The former couple is still battling over Frankel’s estimated $55 million fortune.

Frankel fled a book expo last week after only a smattering of fans showed up to meet the failed talk show host, who was promoting her title, “Cookie Meets Peanut.”

The kids’ book, about a new baby and a diva dog, was “inspired by” Frankel’s life, but the sunny tome is at odds with the unhappy picture of family life that the diet guru painted when she broke down in tears during the custody trial.