The company said that global same-store sales rose 3 percent, however, forecasts called for same-store sales to be up 3.7 percent.

For the second quarter in a row, Starbucks ' same-store sales failed to meet Wall Street expectations, sending shares down more than 4 percent in aftermarket trading Thursday.

Despite the weaker-than-expected same-store sales growth, CEO Kevin Johnson remained optimistic about the rest of the year.



"With our U.S. business accelerating throughout the quarter and strong performance in China, we are poised to deliver strong revenue growth in the second half and into the future," said Johnson said in a press release.

The company said same-store sales improved as the quarter progressed, culminating with a 4 percent U.S. same-store sales growth in March, and further acceleration into April.

In April, Starbucks received a lot of buzz on social media, after releasing a limited-time offering, a sweet-and-sour Unicorn Frappuccino, which quickly sold out at many locations.

Starbucks plans to release a number of new products in the months ahead, which "gives us great confidence in our ability to deliver strong comp sales and revenue growth in the back half of fiscal 2017," said Scott Maw, the company's chief financial officer.

In addition to beverage innovations, Starbucks is slated to open two more of its Roastery locations in 2018 and another in 2019. These "megastores" are designed to be much larger than a traditional Starbucks cafe and allow the company to do small-batch roastings of "rare and exotic" Reserve coffees.

The company could open as many as 20 to 30 of these locations around the world. Currently, Starbucks is slated to have locations in New York, Shanghai, Tokyo, Milan and two in Chicago in the next three years.

The company also reported second-quarter earnings that were in-line with forecasts, but revenue missed analysts' estimates.

The coffee chain posted earnings of 45 cents per share on $5.29 billion. It was expected to report earnings of 45 cents per share on $5.41 billion in revenue, according to Thomson Reuters estimates.

This is breaking news. Check back for updates.