Coffee chain Starbucks (SBUX 0.47%) released its third-quarter earnings on Tuesday that were better than expected.

Coming back to life

For the quarter ended June 28, sales decreased 38% year over year. U.S. comps declined 41%, and China comps were down 19%, as stores were open for more time in that region. Today, 97% of stores are open globally. There was a $0.58 loss per share, which was better than the $0.64 to $0.79 loss projected by the company in an update in June.

Starucks barista serving a drink to a drive-thru customer.

Image source: Starbucks.

Ramping up digital

Starbucks increased investments in digital initiatives which were responsible for keeping sales moving. Close to 90% of sales volume came through drive-thru and mobile order and pay, and mobile payments accounted for 22% of sales, up six points from a year ago. Starbucks Delivers orders tripled from the second quarter.

The company is still dealing with challenges stemming from changes in consumer behavior, such as lost commutes to school and work, which are negatively affecting sales. But there have been optimistic signs due to changed dynamics, such as a 25% increase in average ticket comps as compared to last year. Starbucks continues to pivot to meet those new dynamics with further focus on new sales, payment options, and store formats as well as menu options.

"We have future-proofed our business model and reinforced our balance sheet to enable us to play offense by accelerating key strategic initiatives that further differentiate Starbucks and reinforce the long-term sustainable growth opportunity ahead," CEO Kevin Johnson said on the earnings call.