NEW YORK, N.Y.—Kellogg has agreed to pay $4 million to settle a class-action lawsuit over the marketing claims it made for Frosted Mini-Wheats.

The company, which also makes Frosted Flakes, Eggo waffles and Pop Tarts, was sued for saying that the cereal improved children’s attentiveness, memory and other cognitive functions.

Kellogg says in a statement that the ad campaign in question ran about four years ago and that it has since adjusted its messaging.

If approved by the court, the law firm representing consumers says the settlement will result in cash refunds for up to three boxes of cereal purchased during the time of the advertising in question.

Kellogg Co. is based in Battle Creek, Mich.

Read more: Kellogg to raise nutrition of food for children