The above button links to Coinbase. Yahoo Finance is not a broker-dealer or investment adviser and does not offer securities or cryptocurrencies for sale or facilitate trading. Coinbase pays us for certain activity generated through this link. Prices displayed are informational.

What happened: Hims & Hers Health (HIMS) stock declined 3% before trimming losses on Tuesday.

What's behind the move: Shares were volatile after the telehealth company swung to a loss of $0.37 per share in the second quarter from a profit of $0.17 a share in the year-earlier period.

Gross margins in the second quarter were 64%, down from 76% in the year-earlier period.

The results were impacted by a one-time cost of $81 million during the quarter, including expenses related to the acquisition of the Australian-based digital health company Eucalyptus. The expenses were also related to restructuring following Hims & Hers' shift in weight-loss strategy earlier this year, as well as legal reserves tied to recent litigation with the Federal Trade Commission.

What else you need to know: Hims & Hers Health stock has been recovering from a drawdown earlier this year, as regulatory and legal risks surrounding the manufacturing of compounded GLP-1 weight-loss drugs have weighed on shares.

The company has been pivoting away from copycat weight-loss medications and toward partnerships with pharmaceutical manufacturers.

On July 29, the company faced another challenge when the FTC filed a lawsuit against it, alleging that it shared private health data with advertisers Meta (META)and Snap (SNAP) and made subscription cancellations difficult. Hims & Hers has rejected the claim and vowed to fight it.

"We are confident in our position and intend to defend it vigorously," said CFO Yemi Okupe during the company's earnings call on Monday.

Year to date, the stock is down more than 4%.

Ines Ferre is a senior business reporter for Yahoo Finance. Follow her on X at @ines_ferre.

Click here for in-depth analysis of the latest stock market news and events moving stock prices

Read the latest financial and business news from Yahoo Finance