A shopper carrying a child returns to their car outside a Walmart store in Duarte, California, United States on Thursday, November 12, 2020.

David Swanson | Bloomberg | Getty Images

McDonald’s is closing hundreds of restaurants in Walmart as customers increasingly shop online and opt for the drive-through window.

The big box retailer confirmed on Friday that the fast food chain will have around 150 locations in its 3,570 SuperCenters. That has gradually declined over the years from a high of around 1,000 locations.

The closings were first reported by the Wall Street Journal.

For about three decades, the two corporate giants have teamed up, allowing Walmart shoppers to order a burger and fries after filling their shopping carts with groceries and other merchandise. However, the pandemic has rocked the way customers prefer to shop and dine.

Many Walmart shoppers now buy their groceries online and drop it in their trunk in the parking lot or have it delivered to their home, eliminating the need to step into stores. Walmart’s US e-commerce sales rose 79% year over year for the last fiscal year ended January 31, reflecting foot traffic turned into web traffic.

Chains like Sweetgreen, Shake Shack, and Chipotle Mexican Grill have announced plans to add more drive-through lanes as customers prefer the convenient, contactless approach.

McDonald’s hastened plans to shut down restaurants during the pandemic. Speaking to investors in July, CFO Kevin Ozan said the fast food chain will hasten the closings expected in the coming years – including more than 100 low-volume Walmart locations.

Walmart plans to convert former McDonald’s locations into other types of restaurants and services, including some with a local vibe or unique flair, said Walmart spokeswoman Molly Blakeman. For example, she said, one store has a smoothie machine and several others become ghost kitchens, a central kitchen that cooks for multiple brands or restaurants.

She said it was testing locations with Yum Brands Taco Bell and Domino’s Pizza. In other stores, she said the space has become a different type of store, selling a wide range of products from tool rentals to hair braiding.