It wasn't a sweet day for Hershey workers.

The candy maker said Tuesday that it'll cut its global workforce by about 15%, which likely amounts to about 2,700 people. The company employs about 18,000 people worldwide, according to public filings last December.

The cuts will be "driven primarily by its hourly headcount outside of the United States," the company said in a statement.

Hershey (HSY) said the layoffs are part of a plan to help its international businesses "return to profitability as soon as possible," Hershey CEO Michele Buck said in a press release, and to boost profits.

The company said in its most recent earnings release on February 3 that weighing on its foreign business are unfavorable currency exchange rates and other "macroeconomic challenges...especially in China."

Hershey has been beating Wall Street estimates with its recent earnings reports, and its stock is up 4.8% so far in 2017. But the company says it's taking cost-cutting measures in order to continue driving net sales and profit.

Hershey will offer more details about its cost savings plan at its investor conference in New York on Wednesday.