Subway in the US has agreed to start measuring its 6-inch and 12-inch sandwiches as part of the settlement to a class action lawsuit.

The lawsuit came about after a customer proved that Subway had misrepresented its sandwiches by selling so-called foot-long sandwiches that were not 12-inches long.

Subway has agreed keep a tool for measuring bread in each of its restaurants for at least four years and have monthly inspections to check that sandwiches are the length they are advertised. The settlement also said that Subway workers could be fired if they are caught violating the rules.

Anyone who bought a sandwich at a subway between 2003 and October 2015 can be part of the lawsuit, according to the website subsettlement.com. A fairness hearing will be held in Wisconsin at 10.30am on January 15 to hear other views.

Only the nine named plaintiffs in the case will receive any money, but the rest of Subway’s customers get the peace of mind that their sandwich is the proper length.