Walmart on Wednesday confirmed it plans to lay off corporate employees a week after the company cut its profit guidance, citing inflation.