Walmart plans to increase the minimum age to buy tobacco products to 21 starting July 1, joining a growing list of retailers under pressure from federal regulators to curb sales to minors and boosting their age restrictions as a result.

Walmart told the Food and Drug Administration in a letter Wednesday that it's going to stop selling fruit and dessert-flavored e-cigarettes altogether as part of a plan to prevent minors from buying tobacco.

The FDA in April threatened to fine Walmart, Kroger, Family Dollar and more than a half dozen convenience store chains for illegally selling tobacco products to minors. Walmart had a violation rate of about 17%, the FDA said at the time.

Walmart said it's taking a number of corrective actions, including strengthening penalties for stores that fail secret shopper checks, enhancing its data, analytics and systems as well as upgrading its age-verification training by using virtual reality technology.

"We unequivocally acknowledge that even a single sale of tobacco product to a minor is one too many, and we take seriously our responsibilities in this regard," John Scudder, Walmart's U.S. chief ethics and compliance officer, wrote in the letter Wednesday.

Walgreens and Rite Aid have already announced they are raising their minimum age restrictions to buy tobacco. Rite Aid also said it would stop selling all e-cigarettes though it would continue to sell cigarettes. A dozen states have already increased age requirements and federal lawmakers are also considering raising it to 21 across the U.S.

Read the full letter here.